stripe-terminal-react-native
stripe-terminal-react-native copied to clipboard
[TapToPay] Inconsistent error code when user cancel the payment depending on the platform
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 :
- iOS:
{ code: 'Canceled' }
as described in the enumCommonError.Canceled
so that's ok 👍🏻 - Android:
{ code: 'USER_ERROR.CANCELED' }
=> should it beCommonError.Canceled
too ?
To Reproduce Steps to reproduce the behavior:
- Setup tap to pay on your app
- Create a payment intent
- Call collectPaymentMethod
- Cancel de payment on the phone
- 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
- 0.0.1-beta.15
Smartphone (please complete the following information):
- Device: One Plus 7T
- OS: Android
Additional context N/A
Ran into the same thing today when canceling discoverReaders
. There's a clear workaround to handle both but would be nice to be aligned.
Wait so you guys are using tap to pay with react native all from this library? Do you use expo?