razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
124 stars 107 forks source link

RazorpayCheckout.open() is Crashing the Android Application #430

Closed rupam999 closed 1 year ago

rupam999 commented 1 year ago

When I try to make a payment my android application is crashing on RazorpayCheckout.open(options). I'm using MacBook M1. On IOS it is working fine.

What is the issue? Do I need to do any other steps after npm I react-native-razorpay

Version: react-native-razorpay: 2.3.0

RazorpayCheckout.open(options)
                .then(async (data: any) => {
                  // handle success
                  console.log(`Success: ${data.razorpay_payment_id}`);
                })
                .catch((err: any) => {
                  // handle failure
                  Alert.alert('Error', 'Something went wrong!', [
                    {text: 'OK', onPress: () => null},
                  ]);
                  console.log(`Error: ${err.code} | ${err.description}`);
                  setLoading(false);
                });
VJNoCode commented 1 year ago

Our development team is also facing the same issue - Has this issue been resolved?

rupam999 commented 1 year ago

No, the issue is still there

vivekshindhe commented 1 year ago

@VJNoCode @rupam999 Is it happening on android? Have you folks added the proguard rules if so?

VJNoCode commented 1 year ago

@vivekshindhe - Our development team have added the proguard rules and the issue is still happening on only Android. any help to resolve this will be greatly appreciated. thank you.

vivekshindhe commented 1 year ago

@VJNoCode Can you share any error log that you're seeing in android logs?

KrushnaNaghate commented 1 year ago

this. the issue is with the latest version of the package, this issue was earlier in the 2019 version of package, I just downgraded the package version, for now, npm i react-native-razorpay@2.2.8

rifad4u commented 1 year ago

It might be due some additional parameters passing to checkout API , comment the parameters and check again by uncommenting the parameters one by one.