























laravel-tips Jack Ellis · Feb 5, 2025
It’s been a while since I wrote a Laravel tip. Well, recently our test suite was failing and I was seeing the error:
Laravel\Cashier\Exceptions\IncompletePayment: The payment attempt failed because additional action is required before it can be completed.
I searched around, visited the Stripe documentation and could not find an issue. So I decided to write this post.
Long story short, our test suite would fallover ocassionally on any payment/Stripe related interactions, despite the fact that everything was working fine before.
I did some digging, discovered that subscriptions were “Incomplete” in Stripe, which made me think it was a payment method issue.
Turns out, it was.
The issue is caused by us (and you!) using pm_card_visa or tok_visa casually within our code. Long story short, Stripe is sometimes forcing 3DS on these payment methods. And, sure, you should test handling for these things but, if you’re like us, you were only trying to set-up a subscription in Stripe so you could test other, non-payment mechanics.
We made the following changes:
pm_card_amex_threeDSecureNotSupportedtok_amex_threeDSecureNotSupportedBoth of these are documented in Stripe as a payment method that requires no 3DS (secure payments).
Now our test suite passes with flying colours. I hope this helps somebody out there.
BIO
Jack Ellis, CTO
Tired of how time consuming and complex Google Analytics can be? Try Fathom Analytics:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。