【问题标题】:Razorpay redirect to particular payment methodRazorpay 重定向到特定的付款方式
【发布时间】:2019-12-29 08:11:40
【问题描述】:

我正在我的 React Native 应用程序中集成 Razorpay。它已成功集成到应用程序中。

现在它会打开所有支付方式的屏幕,包括卡、网上银行、钱包和 UPI。我想要实现的是将用户重定向到特定的付款方式。假设如果用户选择 Netbanking,那么应该将其重定向到 razorpay 的 netbanking 页面,而不是打开包含所有支付方式选项的页面。

我用谷歌搜索了它,但没有得到具体的流程来集成它。请告诉我如何实现它。

到目前为止我尝试过的如下:

var options = {
        description: 'Credits towards consultation',
        image: 'https://i.imgur.com/3g7nmJC.png',
        currency: 'INR',
        key: 'KEY',
        amount: '100',
        name: 'FOOO',
        method:"netbanking",
        //bank:"HDFC",
        prefill: {
          email: 'test@gmail.com',
          contact: '919191919991',
          name: 'Razorpay Software'
        },
        theme: {color: '#F37254'}
      }
      RazorpayCheckout.open(options).then((data) => {
        // handle success
        console.log("razorpay success : " + JSON.stringify(data));
        alert(`Success: ${data.razorpay_payment_id}`);
      }).catch((error) => {
        // handle failure
        console.log("razorpay success : " + JSON.stringify(error));
        alert(`Error: ${error.code} | ${error.description}`);
      });

在这里,method:"netbanking", 不起作用。它始终打开包含所有付款方式的初始页面。我正在使用react-native-razorpay 库来实现。

【问题讨论】:

    标签: react-native integration react-native-android razorpay


    【解决方案1】:

    如果您在页面上列出了付款方式,那么您可以根据用户选择在 Razorpay 上预先填写该方式,如下所示,

    Other checkout options;
    'prefill': {
           'email': 'test@gmail.com',
           'contact': '919191919991',
           'name': 'Razorpay Software',
           'method': 'netbanking', //card|upi|wallet
     },
    'theme': {
           'color': '#F37254',
           'hide_topbar': 'true', //To hide the back button
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-11
      • 2013-09-04
      • 2018-07-16
      • 2021-11-06
      • 1970-01-01
      • 2013-05-26
      • 2019-04-09
      • 2017-04-14
      相关资源
      最近更新 更多