title: No 'Access-Control-Allow-Origin' header is present on the requested resource - Mollie payment ajax
body: <p>I'm trying to create a mollie payment with the following 2 libraries:</p>
  
  <ul>
  <li><a href="https://github.com/barryvdh/laravel-omnipay" rel="nofollow noreferrer">https://github.com/barryvdh/laravel-omnipay</a></li>
  <li><a href="https://github.com/thephpleague/omnipay-mollie" rel="nofollow noreferrer">https://github.com/thephpleague/omnipay-mollie</a></li>
  </ul>
  
  <p>When the client fills in the form and submits an ajax request will be made to a function in my laravel application. </p>
  
  <p>In my Laravel function I'm trying to do the following:</p>
  
  <pre><code>$gateway = Omnipay\Omnipay::create('Mollie');
  
  $gateway-&gt;setApiKey('test_gSDS4xNA96AfNmmdwB3fAA47zS84KN');
  
  $params = [
      'amount' =&gt; $ticket_order['order_total'] + $ticket_order['organiser_booking_fee'],
      'description' =&gt; 'Kapelhoek wijkfeesten',
      'returnUrl' =&gt; URL::action('EventCheckoutController@fallback'),
  ];
  
  
  $response = $gateway-&gt;purchase($params)-&gt;send();
  
  
  if ($response-&gt;isSuccessful()) {
      // payment was successful: update database
      print_r($response); die;
  } elseif ($response-&gt;isRedirect()) {
      // redirect to offsite payment gateway
      return $response-&gt;getRedirectResponse(); die;
  } else {
      // payment failed: display message to customer
      echo $response-&gt;getMessage(); die;
  }
  </code></pre>
  
  <p>But I'm getting this response:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="https://www.mollie.com/payscreen/select-method/PRMtm6qnWG" rel="nofollow noreferrer">https://www.mollie.com/payscreen/select-method/PRMtm6qnWG</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://kapelhoektickets.dev" rel="nofollow noreferrer">http://kapelhoektickets.dev</a>' is therefore not allowed access.</p>
  </blockquote>
  
  <p>How can I fix this?</p>