【问题标题】:How to set Multiple Option of Payment In PayUMoney Payment Gateway in Android如何在 Android 的 PayUMoney 支付网关中设置多种支付选项
【发布时间】:2021-10-08 06:15:33
【问题描述】:

我的依赖文件在这里

implementation 'com.payumoney.sdkui:plug-n-play:1.6.1'

payUmoney代码

 private fun startPay() {
    builder.setAmount(amount)                          // Payment amount
            .setTxnId(txnid)                     // Transaction ID
            .setPhone(phone)                   // User Phone number
            .setProductName(prodname)                   // Product Name or description
            .setFirstName(firstname)                              // User First name
            .setEmail(email)              // User Email ID
            .setsUrl("https://www.payumoney.com/mobileapp/payumoney/success.php")     // Success URL (surl)
            .setfUrl("https://www.payumoney.com/mobileapp/payumoney/failure.php")     //Failure URL (furl)
            .setUdf1("")
            .setUdf2("")
            .setUdf3("")
            .setUdf4("")
            .setUdf5("")
            .setUdf6("")
            .setUdf7("")
            .setUdf8("")
            .setUdf9("")
            .setUdf10("")
            .setIsDebug(true)                              // Integration environment - true (Debug)/ false(Production)
            .setKey(pro_merchantkey)                        // Merchant key
            .setMerchantId(pro_merchantId);
    try {
        paymentParam = builder.build()
        getHashkey()
    } catch (e: Exception) {
        Log.d("afkafbakabkab", " errors $e")
    }

}

从这里开始的付款流程

 private fun getHashkey() {
    paymentParam!!.setMerchantHash(CreateHash())
    PayUmoneyFlowManager.startPayUMoneyFlow(paymentParam, this as PaymentGateways, R.style.AppTheme_default, true);

}

从此代码生成哈希键

 private fun CreateHash(): String {

    var hashSequence: String = pro_merchantkey + "|" + txnid + "|" + amount + "|" + prodname + "|" + firstname + "|" + email + "|" +
            udf1 + "|" + udf2 + "|" + udf3 + "|" + udf4 + "|" + udf5 +"||||||"+ pro_salt;

    val hash = hashcal("SHA-512", hashSequence)

    return hash

}

注意:- 我只获得一种付款方式,我想获得多种付款方式,例如网上银行、Upi

【问题讨论】:

    标签: java android kotlin payumoney


    【解决方案1】:

    您已将setIsDebug() 设置为true;出于某些原因,PayU 仅提供用于测试目的的测试卡。 因此,发布版本将具有所有选项。 简单地说,设置setIsDebug(false),您将获得所有选项。

    【讨论】:

      猜你喜欢
      • 2015-03-20
      • 2015-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-20
      • 1970-01-01
      • 2023-03-20
      • 2016-11-21
      相关资源
      最近更新 更多