stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

presentApplePay onPress background creates unhandled-able error

Open kyapwc opened this issue 5 years ago • 1 comments

Describe the bug By using the presentApplePay method, it was fine when I clicked on cancel button on the modal. However, if I press on the background, my payment will be logged, but not shown in the stripe dashboard, so I cant cancel it. Furthermore, the error that comes up is Payment not completed.

To Reproduce Steps to reproduce the behavior:

  1. call presentApplePay with appropriate params:
const { error } = await presentApplePay({
  cartItems: [{
    label: 'Test,
    amount: '10.50',
  }],
  country: 'HK',
  currency: 'HKD',
})
  1. Click background
  2. Call presentApplePay again
  3. See error

Expected behavior Should create new payment method without relying on previous payment.

Screenshots Using alert to display the error.message image

Desktop (please complete the following information):

  • OS: MacOS 10.15.7
  • Browser: Firefox
  • Version: 89.0.2 (64-bit)

Smartphone (please complete the following information):

  • Device: iOS Simulator iPhone Pro Max
  • OS: 14.1
  • Browser: stock browser

kyapwc avatar Jul 16 '21 03:07 kyapwc

It seems the amount has to be in 2 decimal format, therefore my cartItems was wrong and my app had some caching issue. No issues. Thanks and sorry for the confusion

kyapwc avatar Jul 19 '21 10:07 kyapwc