Mollie not working

Hi there!

I am running a self-hosted v4.5.19 | White labeled on an Ubuntu 18.0.4 via Digital Ocean One-Click app.
Everything seems to be working as it should, only the Mollie refuses to cooperate.

When clicking “pay now” on the invoice, I am being shown following error:

Mollie: The redirect URL is invalid

Moreover, the pay now button has no options to choose the payment method (like the Stripe does) and defaults to credit card:

https://mydomain.tld/payment/#########################/credit_card

i have checked the logs and this is what I found there:

[2020-08-12 17:13:18] production.INFO: Payment Error [mollie]: ***Exception*** [0] : /var/www/html/ninja/app/Ninja/PaymentDrivers/BasePaymentDriver.php [Line 435] => The redirect URL is invalid {"context":"PHP","user_id":1,"account_id":1,"user_name":"#########","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36","locale":"nl","ip":"999.999.999.999","count":12,"is_console":"no","is_api":"no","db_server":"mysql","url":"payment/################/credit_card"} []

Hmm… I’m not sure, are you using a proxy?

no, @hillel no proxy.
I had checked it on 3 computers: each at different location and using different ISP

at server side, InvoiceNinja is running on LEMP stack

Sorry, I’m not sure. I believe the gateway is working for other users.

Are you able to see the request details in the Mollie portal?

no. the request is not reaching Mollie

I’m not sure… if you want to debug the code here’s where we set the returnUrl in Invoice Ninja and then where it’s passed to Mollie in the payment driver.

so I inserted a file dumping functions in both files

pay now button has following url:

https://mydomain.tld/payment/aaaaaaaaaaaaaaaaaaaaaaaa/credit_card

and when clicked, the first file dumps following:

mydomain.tld/complete/aaaaaaaaaaaaaaaaaaaaaaaa/credit_card

and dumping whole $data array from second file, yields following results:

array (
  'amount' => '72.60',
  'description' => 'Factuur F200051',
  'redirectUrl' => 'mydomain.tld/complete/aaaaaaaaaaaaaaaaaaaaaaaa/credit_card',
  'method' => NULL,
  'metadata' =>
  array (
    'transactionId' => 'F200051',
  ),
  'webhookUrl' => 'https://mydomain.tld/payment_hook/aaaaaaaaaaaaaaaaaaaaaaaa/9',
)

I’m not sure, that looks ok to me.