razorpay / react-native-razorpay

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

App Crashes when Payment Cancelled from Google Pay #353

Closed Rohan-Rajesh closed 3 years ago

Rohan-Rajesh commented 3 years ago

Description

I know that this issue is a duplicate but i commented on it and did not get a response, so basically the problem is that I am using a library react-native-upi-payment which enables the user to directly accept payment from apps installed on their device, I need this functionality in my app so is there any way Razorpay can directly call UPI apps to accept payments, if yes can someone please support on how to implement this... if not is there any way I can use both libraries in the same app.

Razorpay Package Version :

2.2.7

What you did:

My app crashes whenever I cancel a payment from google pay...

What happened:

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Install and configure Razorpay react native
  2. Install and configure react-native-upi-payment
  3. Call UPI payment (from react-native-upi-payment) and cancel payment from google pay

Suggested solution:

As I have said above, you can either call UPI apps for payment directly from Razorpay or can fix the clash between the 2 libraries

Code example, screenshot, or link to a repository:

Here is the previous issue (no real solution was given): https://github.com/razorpay/react-native-razorpay/issues/330

vivekshindhe commented 3 years ago

@Rohan-Rajesh Hey, thanks for reaching out. I read the comment you posted there. Razorpay does in fact allow UPI Intent Payment method as well. I'm guessing you were checking in an android 11 device. Starting from android 11, in case you have to query for an app, you have to add the details of the apps you'll be querying in the AndroidManifest.xml file. This doc will help you add the data in the AndroidManifest file. And this, doc has the list of UPI apps currently live on the Market. Unfortunately, we won't be able to support usage of the other library you mentioned along with the react-native-razorpay library. But please be assured, UPI Intent Payments are enabled in Razorpay.

Rohan-Rajesh commented 3 years ago

Sorry for missing that, it worked perfectly Thanks a lot, closing the issue now