Webhook problem after running cashier command
royjeurissen opened this issue · 5 comments
It's more like a question. When i create a subscription the /webhooks/mollie/first-payment webhook is called an i get a subscription in my tabel. I have the subscription set to 2 minutes, so i can test the sepa payments.
But when i do that i would have suspected the next webhook is being called which is webhooks/mollie (in cashier.php)
This never happens, so my order doesnt get updated to paid and in the mollie dashboard the sepa stays on pending...
Is this normal behavior? I have a ngrok tunnel set up. and i see in the log that it gets POST /webhooks/mollie/first-payment 200 OK
but i never see /webhooks/mollie in my logs. (after i run cashier:run)
Hi,
Yes this is normal behavior when using a Mollie testkey. Mollie does not automatically update payment statuses for mandated payments.
Hi Sander, Thank you for your response.
Just to be sure... saying that it doesn't update automatically confuses me a bit. That it doesn't work with a test key, thats fine.
but when i have a scheduled job running the cashier:run command with a production key it will work? and it will update the status in my database and in Mollie or do i have to update it somehow myself? i thought webhook/mollie
will handle this logic.
Source: https://docs.mollie.com/guides/testing
You could use something like this to access the payment and retrieve the appropriate url from there.
mollie()->payments->get($order->mollie_payment_id)
So yes, it's because of the test key and it works in production. But using that payment url you can test your integration - which I recommend. Enjoy!
Okay! Thank you for your time explaining this to me!