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

App crashes after payment response android #234

Closed pawanvivekananda closed 4 years ago

pawanvivekananda commented 4 years ago

react: 16.9.0 react-native: 0.61.2 react-native-razorpay: 2.1.31

Got payment response app crashes before returning to actual app from razorpay UI.

Using below sample code

<TouchableHighlight onPress={() => {
  var options = {
    description: 'Credits towards consultation',
    image: 'https://i.imgur.com/3g7nmJC.png',
    currency: 'INR',
    key: 'rzp_test_1DP5mmOlF5G5ag',
    amount: '5000',
    name: 'foo',
    prefill: {
      email: 'void@razorpay.com',
      contact: '9191919191',
      name: 'Razorpay Software'
    },
    theme: {color: '#F37254'}
  }
  RazorpayCheckout.open(options).then((data) => {
    // handle success
    alert(`Success: ${data.razorpay_payment_id}`);
  }).catch((error) => {
    // handle failure
    alert(`Error: ${error.code} | ${error.description}`);
  });
}}>
theycallmeloki commented 4 years ago

react-native: 0.61.2 has to be version 0.58 for razorpay to work

mohammedavez commented 4 years ago

I am also having the same problem after successful transaction the app doesn't run the .then function it just reloads the app. It only happen sometimes

sanjeevkse commented 4 years ago

I am facing the same issue.

sanjeevkse commented 4 years ago

react-native: 0.61.2 has to be version 0.58 for razorpay to work

Did this work for anyone?

Reactongraph commented 4 years ago

I am also having the same problem after a successful transaction the app doesn't close and after the canceling transaction it closed .then function it just reloads the app. It only happens sometimes.

vivekshindhe commented 4 years ago

Closing this issue due to no activity. Please feel free to either re-open the issue or create a new issue if you have any additional queries.