laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 667 forks source link

Confirm payment screen not processing payment correctly #1655

Closed josipRajkovicFlowout closed 6 months ago

josipRajkovicFlowout commented 6 months ago

Cashier Stripe Version

14.12.2

Laravel Version

10.13.0

PHP Version

8.1.16

Database Driver & Version

No response

Description

Hello, first of all thank you for a great product, we enjoy using it very much. In our implementation of cashier with subscriptions, we are experiencing a weird issue I haven't been able to track anywhere, so I'm sure there is just something that I missed during implementation. We, as many others merchants are experiencing the failed payments for subscriptions due to incomplete payment. In that case the subscription is marked as past_due which is fine and is displayed on the front-end as well in the form of a button "Confirm payment" to prompt the user to confirm payment: image Upon clicking that button a user is routed to "route('cashier.payment') with the last payment id as a parameter image which shows them a page like this: image

But as you can see the payment method is missing after "with" word and I can't figure out what could be causing it. I can see the payment id parameter in the URL populated correctly, if I search for it in Stripe I find the payment intent that is incomplete. If user clicks the Confirm your payment button it changes to "Processing..." and a console.error is thrown:

Cannot read properties of undefined (reading 'remember')
    at wn.confirmPaymentMethod

which indicates that the payment method couldn't be loaded. I've inspected the resources/views/payment.blade.php and I can't seem to find any logic that would handle the Link payment, but I'm probably understanding all of this wrong, explanation would be appreciated greatly.

If I check the customer in Stripe portal I can see that only payment method they have is Link payment method. We experienced a similar issue once in the past with a user that had multiple payment methods entered and removing them fixed the issue, but doing the same now doesn't.

For now we sent the Stripe generated payment page and that serves as a workaround for now, but we'd like to fix to avoid it. Any ideas?

Thanks

Steps To Reproduce

It's not reliable reproduction but subscription needs to have an incomplete payment which sets it as past_due and user needs to have only Link payment method on their account.

driesvints commented 6 months ago

Hey there,

Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.

Thanks!