mkharibalaji / react-native-adyen-payment

React Native Adyen Payment
https://mkharibalaji.github.io/react-native-adyen-payment/
MIT License
35 stars 35 forks source link

`additionalData` in response is not necessarily present, causes crash #10

Closed murrple-1 closed 4 years ago

murrple-1 commented 4 years ago

After confirming the payment, a web request is made which returns a success code and the pspReference, among other things. However, there is an optional field called additionalData, which is only set if setup on the Adyen dashboard via Account > API URLs > Additional data settings. Both the Android and iOS code assume that the field is there, and will crash if it is not.

This is either a code change issue, or a documentation issue if there is a reason the field is read.

One can recreate the crash by unchecking all boxes in the Additional data settings mentioned above, then making a payment.

I hope to have more details when I get my project back in gear.