-
-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to provide server side failures (payment intent creation) in deferred payment sheet #1766
Comments
I think the name is a bit confusing. If I read the docs of the sdk the current behavior is how stripe intent to work: /*
intentCreationCallback: Call this with the `client_secret` of the PaymentIntent or SetupIntent created by your server or the error that occurred. If you're using customFlow: false (default), the error's localizedMessage will be displayed to the customer in the sheet. If you're using customFlow: true, the `confirm` method fails with the error.
*/ For example I can call the intent with the StripeException: await Stripe.instance.intentCreationCallback(IntentCreationCallbackParams(
error: StripeException(
error: LocalizedErrorMessage(code: FailureCode.Failed)))); |
Thank you for the reply. Probably I'm doing something wrong but I'm a bit confused on how to handle possible failures inside the If I call the |
Any suggestion? |
Hi @Cabba, |
Hi @SaddarTuri, On our side I think the issue with the deferred payment sheet was caused by not using the same payment intent across multiple I've not closed the issue since I think the Hope this helps! |
Hi @Cabba, |
Describe the bug
Using deferred payment sheet
Stripe.instance.intentCreationCallback
insideconfirmHandler
ininitPaymentSheet
never returns even iferror
is provided andclientSecret
is not provided.Throwing exception in the
confirmHandler
results in "forever loading" state of the payment sheet.As consequence if a payment method, that fails server side or network side, is provided the payment sheet reports correctly an error. After that if a correct payment method is provided the payment sheet complete the payment but an error is presented to the user. Multiple tap on the pay button results in multiple payments made.
To Reproduce
Code in the deferred payment sheet example.
Expected behavior
intentCreationCallback
should return if anerror
is provided.Smartphone / tablet
All devices
The text was updated successfully, but these errors were encountered: