presentApplePay onPress background creates unhandled-able error
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:
- call
presentApplePaywith appropriate params:
const { error } = await presentApplePay({
cartItems: [{
label: 'Test,
amount: '10.50',
}],
country: 'HK',
currency: 'HKD',
})
- Click background
- Call
presentApplePayagain - See error
Expected behavior Should create new payment method without relying on previous payment.
Screenshots
Using alert to display the error.message

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
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