Skip to content
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

[BUG] [PaymentSheet] Payment gets failed on back press. #5844

Closed
fbarthelery opened this issue Nov 17, 2022 · 4 comments · Fixed by #5848
Closed

[BUG] [PaymentSheet] Payment gets failed on back press. #5844

fbarthelery opened this issue Nov 17, 2022 · 4 comments · Fixed by #5848
Labels

Comments

@fbarthelery
Copy link

Summary

Related to #5771, if user presses back button in the middle of processing, the PaymentSheetActivity may finish before processing complete and the result intent will not be set. PaymentSheetContract.parseResult() will then set a PaymentSheetResult.Failed while backend will get a confirmed payment.

stripe-android: 20.16.0

SDK classes

PaymentSheet, PaymentSheetActivity

@jameswoo-stripe
Copy link
Contributor

@fbarthelery do you mind sharing a video of your error? I think I understand the issue, based on the one you linked. I was able to reproduce a part of your issue, but I only get PaymentSheetResult.Canceled. It still isn't ideal, but I would like to see how you are receiving PaymentSheetResult.Failed.

I will look into this issue further. Thank you for raising it!

@jameswoo-stripe
Copy link
Contributor

Hi @fbarthelery I have merged a PR to potentially fix this issue. Please let me know if you continue to see this problem after upgrading to the latest version. We typically release every monday.

@fbarthelery
Copy link
Author

My bad I meant PaymentSheetResult.Canceled not failed.
I think the fix should be good. I'll test it when the release is out.

@fbarthelery
Copy link
Author

@jameswoo-stripe , I tested the fix on 20.16.1, it works great. However I just want to give you an heads up that Activity.onBackPressed() is not called when you opt in to predictive back gesture.

So #5771 should be fixed with predictive back gesture enabled, but this #5848 bug is not fixed with predictive back gesture enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants