naoufal / react-native-payments

Accept Payments with Apple Pay and Android Pay using the Payment Request API.
https://www.npmjs.com/package/react-native-payments
1.59k stars 413 forks source link

RN iOS application crashes when using ApplePay to place an order #398

Open dfragosodiaz opened 1 year ago

dfragosodiaz commented 1 year ago

Hello, Our React Native iOS app is crashing when the user tries to place an order using Apple Pay. We have been using this library and Apple Pay has been very stable for the past few years until last week. The app crashes when we attempt to retrieve the encrypted token from Apple Pay.

Exception error: 'ReactNativePayments.m line 74 __28-[ReactNativePayments show:]_block_invoke Application tried to present a nil modal view controller on target.'

We have already checked our payment processing certificate, and it is not expired. Additionally, all our Apple entitlements keys remain unchanged. Does anyone have any idea of why this might be happening? Did something change lately with this package that might be causing problems interacting with ApplePay?

rajarshi-singh commented 1 year ago

@dfragosodiaz and our team seemed to have figured out the root cause, it is problematic however that the error message does not provide any context what is going wrong. We were missing an important parameter while making the request.