mollie / laravel-cashier-mollie

Official Mollie integration for Laravel Cashier
https://www.cashiermollie.com/
MIT License
136 stars 44 forks source link

Question: How to handle failed payments. #231

Closed Juleshendriks closed 6 months ago

Juleshendriks commented 6 months ago

Can anyone confirm the following:

When a payment fails, my application gets informed trough the webhook. I can listen in my application for the events: OrderPaymentFailed and OrderPaymentFailedDueToInvalidMandate.

Inform my users their payment has failed and they need to update their payment method. When payment method is updated, retry the payment.

Thanks in advance.

Naoray commented 6 months ago

Hi @Juleshendriks,

that's exactly right. You can then use the Order's id from the events to find the specific order and retry them after the user has updated the payment method.

$order->retryNow();

s. https://www.cashiermollie.com/14-retry.html#subscriptions-and-failed-payments for further details.