stripe / stripe-terminal-react-native

React Native SDK for Stripe Terminal
https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=react-native
MIT License
108 stars 50 forks source link

[TapToPay] Inconsistent error code when user cancel the payment depending on the platform #634

Open eeynard opened 7 months ago

eeynard commented 7 months ago

Describe the bug After calling collectPaymentMethod, the TapToPay UX appears and if the user cancel the payment, we receive different error codes depending on the platform :

To Reproduce Steps to reproduce the behavior:

  1. Setup tap to pay on your app
  2. Create a payment intent
  3. Call collectPaymentMethod
  4. Cancel de payment on the phone
  5. Check the error code

Expected behavior Android Only : The error code returned when the payment is canceled should be Canceled (enum: CommonError.Canceled) and not USER_ERROR.CANCELED

Screenshots N/A

Stripe Terminal React Native SDK version

Smartphone (please complete the following information):

Additional context N/A

rachelanordgren commented 7 months ago

Ran into the same thing today when canceling discoverReaders. There's a clear workaround to handle both but would be nice to be aligned.

CarlMenke commented 7 months ago

Wait so you guys are using tap to pay with react native all from this library? Do you use expo?