mollie-api-php: Payment Create API call keeps timing out

Specifications

  • API Version: v2

Describe the issue

I’m trying to create an integration for Mollie for the e-commerce software that I build. However, whenever I try to make a request to the payment create endpoint using this API or through the Laravel version (which uses this SDK) I always seem to get a timeout error.

cURL error 28: Resolving timed out after 10057 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

This is the code I’m using to make the request, it’s pretty much the same as in the readme of this package.

$payment = $this->mollie->payments->create([
            'amount' => [
                'currency' => 'GBP',
                'value' => '25.00',
            ],
            'description' => 'Order: #1234',
            'redirectUrl' => 'http://simple-v2.test/!/simple-commerce/gateways/mollie/redirect',
            'webhookUrl'  => 'http://simple-v2.test/!/simple-commerce/gateways/mollie/webhook',
]);

I’m thinking this could be an issue with Mollie’s systems, maybe? Could be it be an issue that the API key it’s using is for a new account that’s not been activated yet or could it be an issue to do with the two urls not being reachable (they are localhost URLs from Laravel Valet).

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks @willemstuursma for your response!

I actually managed to resolve the issue I was having locally with resolving the Mollie API last week while trying to fix another timeout API issue.

All I did was change my local DNS servers away from OpenDNS (who I used previously) to Cloudflare’s DNS server (1.1.1.1) and the response time dropped and I don’t seem to have any issues again, even if I switch back to OpenDNS🤔 Something must have been cached.

@Softens, sorry for the radio silence, we’ve been quite busy debugging this issue over the past few days. We will have a workaround for you to test on Tuesday.