Inertia

Handle payment failed in Laravel Cashier

Hey Alex and community,

How would you handle payment failed when using Laravel/InertiaJS? Any course on codecourse or online reference?

So far, I have this plan:

  • Add a new middleware to check for $user->hasIncompletePayment()
  • If user has incomplete payment (or past_due status), I redirect the user to a page to update the payment method. I see Laravel Cashier has a payment.blade view.
  • Now that the payment method is updated, what happens next? I believe Stripe would retry the payment, if payment succeeds, the subscription is back to active.

What are you thoughts on this?

This is the confirm payment view I am referring to. payment.blade.php

Thank you Bilal

BilalHaidar
BilalHaidar
0
0
246