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

Android 3D secure payment incorrectly fails with 'user canceled' if user has previously closed the payment sheet #1650

Open
zakgogiBH opened this issue Apr 30, 2024 · 0 comments

Comments

@zakgogiBH
Copy link

Describe the bug

If the user closes the payment sheet once, reopens the payment sheet, and then attempts to pay with a card that requires 3d secure authentication, the presentPaymentSheet function incorrectly returns a user canceled error. Visually, the payment sheet still provides positive feedback with a green tick, and the success web hooks fire as expected.

Trying to reopen the payment sheet again after this error then fails because the paymentIntent has been used, with No payment sheet has been initialised.

We've reproduced this in our own app with an android emulator as well as in the example repo.

To Reproduce

Steps to reproduce the behavior:

  1. On an android device, open the stripe payment sheet
  2. Close the payment sheet manually
  3. Reopen the sheet, and pay with a card that triggers 3d secure (we've been using 4000000000003220 from this section of the docs)
  4. Authenticate the payment properly
  5. Payment will show as complete
  6. { error } from presentPaymentSheet will return user canceled error instead of success
  7. Attempting to reopen the sheet now will throw No payment sheet has been initialised error

Expected behavior

We expect presentPaymentSheet to not return an error after successful payment with 3d secure in the scenario described above.

Smartphone (please complete the following information):

  • Device: Pixel 5
  • OS: Api 34

Additional context

  • Tried on both @stripe/stripe-react-native version 0.37.3 & 0.37.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant