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

NetBanking and UPI Flow is missing #431

Closed prasanthreactdev closed 1 year ago

prasanthreactdev commented 1 year ago

Current Behavior Scenario One: I am using react-native-custom-UI SDK for payment Integration. In debug mode when the user chooses net banking as a payment method, Razorpay SDK opens and is directly taken to the success or failure page I attached the code which I have used

Expected Behaviour scenario one: When the user selects the net banking option, SDK should open the selected bank's credentials page i.e username and password entering page.

Current Behavior Scenario Two: When I choose Gpay or paytm Upi mode for payment, SDK lists all available apps in Ui to select, even though if I pass upi_app_package_name as Gpay or paytm , it still lists all available UPI apps. To get available UPI indent apps I use Razorpay.getAppsWhichSupportUPI() method

Expected Behaviour scenario two: When the user taps on Gpay or Paytm icon, SDK should directly open the selected upi app for payment

 const selectedPaymentType="netBanking"
 let defaultOptions = {
      description: 'payment',
      currency: 'INR',
      amount: 10000 * 100,
      email: sample@gmail.com,
      contact: 9744845123,
      method:  selectedPaymentType === 'netBanking' ? netBankingOptions : upiOptions,
      order_id: orderId,
     key_id: razorpayId,
    };
    let upiOptions = {
      ...defaultOptions,
      upi_app_package_name: 'GPay',
      '_[flow]': 'intent',
    };
    let netBankingOptions = {
      ...defaultOptions, 
     bank:'HDFC',
    };
    Razorpay.open(
      selectedPaymentType === 'NetBanking' ? netBankingOptions : upiOptions,
    )
      .then((data: RazorPayCheckoutSuccess) => {

      })
      .catch((error: RazoryPayCheckoutFailure) => {

      });
vivekshindhe commented 1 year ago

Current Behavior Scenario One: I am using react-native-custom-UI SDK for payment Integration. In debug mode when the user chooses net banking as a payment method, Razorpay SDK opens and is directly taken to the success or failure page I attached the code which I have used

This is happening because you are using test key. Using live key which starts with rzp_live_xxxxxxx should take you to the bank page.

When I choose Gpay or paytm Upi mode for payment, SDK lists all available apps in Ui to select, even though if I pass upi_app_package_name as Gpay or paytm , it still lists all available UPI apps. To get available UPI indent apps I use Razorpay.getAppsWhichSupportUPI() method

as the key name suggests, you need to pass the packagename for android or the shortcode for iOS. Sending the name doesn't help in either case. You get packageName in the response of getAppsWhichSupportUpi().

We will be making a release where the response will also contain shortcode for iOS by tomorrow or the day after at the latest.

prasanthreactdev commented 1 year ago

Thanks for the information