question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React native app is crashing after confirming payment with razorpay test key?

See original GitHub issue

I am trying to implement UPI payment in my react native app but my app is crashing on successful payment even though I am getting a successful payment alert. I am using the customui SDK for implementing Razorpay payments. I am not getting any kind of exception or error, the app is just shutting down. I am using react native version 0.61.5 Any help would be appreciated. Thank you.

Checkout code

    var options = {
        currency: 'INR',
        key_id: 'test_key',
        amount: this.props.total,
        vpa:this.state.upi,
        contact: 'XXXXXXXXXX',
        email: 'XXXXXXXXX',
        method: 'upi'          
      }
      Razorpay.open(options).then((data) => {
        // handle success
        alert(`Success: ${data.razorpay_payment_id}`);
        console.log(`Success: ${data.razorpay_payment_id}`)
      }).catch((error) => {
        // handle failure
        alert(`Error: ${error.code} | ${error.description}`);
        console.log(`Error: ${error.code} | ${error.description}`)
      });

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
Aryan6290commented, Oct 15, 2021

@knevagi Could you solve the issue? I am have the same issue.

react - 17.0.1 react-native - 0.64.1 react-native-razorpay - 2.2.7 Device - Android

My checkout code-

let options = {
      description: 'Test',
      currency: 'INR',
      key: 'test_key',
      amount: '50000',
      name: 'Test Account',
      // order_id: razorId,
      prefill: {
        email: 'XXXXXXXX',
        contact: 'XXXXXXXX',
        name:'XXXXXXXX,
      },
      theme: {color: '#009ED2'},
    };
    RazorpayCheckout.open(options)
      .then(data => {
        console.log(data);
        Alert.alert(`Success: ${data.razorpay_payment_id}`);
      })
      .catch(err => {
        console.log(err);
        console.log(`Error: ${err.code} | ${err.description}`);
      });

The app crashes on clicking either Success or Failure. No error log is displayed. Any help would be much appreciated. Thanks in advance. Do you managed to find its solution? Am stuck here, the app is crashing after success and failure callbacks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does react native app crash after confirming upi payment ...
This will cause Razorpay references in your code to not be minified. This will solve the issue if anyone faces this.
Read more >
react-native-razorpay/CHANGELOG.md - UNPKG
The CDN for react-native-razorpay. ... 13, - React native app is crashing after confirming payment with razorpay test key?
Read more >
react-native-razorpay - Yarn - Package Manager
React Native wrapper around our Android and iOS mobile SDKs ... App is getting crashed in android when i call open function. #265;...
Read more >
Payment Gateway | React Native - Troubleshooting & FAQs
Open android/app/src/main/java/[...]/MainApplication.java . Add import com.razorpay.rn. · Append the following lines to android/settings.gradle : Settings Gradle.
Read more >
react-native-video shows blank screen in my app without any ...
Why does react native app crash after confirming upi payment with razorpay? ... Why isn't zIndex working in React Native? How to test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found