wgltony / react-native-braintree-dropin-ui

React Native integration of Braintree Drop-in for IOS & ANDROID (Apple Pay, Google Pay, Paypal, Venmo, Credit Card)
MIT License
78 stars 105 forks source link

paymentMethodType for apple pay #105

Open cemergen opened 1 year ago

cemergen commented 1 year ago

Hi, I've found a problem on RNBraintreeDropIn.m file. The app was crashing when I tried to use apple pay option. I've investigated the code and I noticed paymentMethodType for apple pay was 17. the existing code is like that:

if(result.paymentMethod == nil && (result.paymentMethodType == 16 || result.paymentMethodType == 18)){ //Apple Pay

I've added new one to handle the case

if(result.paymentMethod == nil && (result.paymentMethodType == 16 || result.paymentMethodType == 17 || result.paymentMethodType == 18)){ //Apple Pay

after that fix, it was looking working. I can make payments by using apple pay option. Can I use this fix on my production app?

thanks.