【问题标题】:Issue in PayUmoney Android integrationPayUmoney Android 集成中的问题
【发布时间】:2017-03-03 14:36:07
【问题描述】:

我正在尝试将 PayUMoney 集成到我的应用程序中。

如果我使用以下测试凭据,应用程序会给出正确的输出;

String merchant_key = "kYz2vV"; 
String salt = "zhoXe53j"; 
String base_url = "https://test.payu.in/_payment"; 
String SUCCESS_URL = "https://www.payumoney.com/mobileapp/payumoney/success.php";
String FAILED_URL = "https://www.payumoney.com/mobileapp/payumoney/failure.php";

当我用实时凭据替换 Key 和 salt 时;

String merchant_key = "gtKFFx"; 
String salt = "eCwWELxi";
String base_url = "https://secure.payu.in/_payment";
String SUCCESS_URL = "https://www.payumoney.com/mobileapp/payumoney/success.php";
String FAILED_URL = "https://www.payumoney.com/mobileapp/payumoney/failure.php";

Webview 向我显示错误之类的;

在这两种情况下,我都会发送以下参数;

"amount" -> "2.00"
"phone" -> "1234567899"
"service_provider" -> "payu_paisa"
"txnid" -> "d14c0152fd952498ebbf"
"email" -> "test@gmail.com"
"hash" -> "b7f634896ec080f9f31424bd7c189e440f4cba573ada744dc2069ac9c79fa2bb95f3c7dc48f65eb123b0dd3c70de0b3fedfedca0ee3c013eb7a52c55e7833b31"
"surl" -> "https://www.payumoney.com/mobileapp/payumoney/success.php"
"furl" -> "https://www.payumoney.com/mobileapp/payumoney/failure.php"
"firstname" -> "test"
"productinfo" -> "Test"
"key" -> "gtKFFx"(for live) / "kYz2vV"(for test)

请给我一些解决方案。

谢谢。

【问题讨论】:

  • 你在用什么payumoney凭证或payubiz凭证?
  • @AbhishekAgarwal 凭据意味着您是在询问有关 Merchant_key 和 salt 的问题吗?
  • @Priyanka,我也在关注 payu 支付,你能在模拟器 4.3 中运行演示应用吗?
  • @Jayesh 是的。它在 4.3 模拟器上运行。
  • 我认为live api的merchant_key和salt不应该在这里发布

标签: android payment-gateway payu payumoney


【解决方案1】:

我使用这个参考解决了这个问题;

https://wordpress.org/support/topic/how-to-fix-payumoney-payubiz-plugin-error/

我为 Live url 使用了错误的 Key & salt 值。

其次,我在 PayUbiz 上有商家帐户,所以我需要在“service_provider”中传递空值。

【讨论】:

  • 如何在angular6/7/8网站上整合payumoney?
【解决方案2】:

我已使用此链接示例代码集成 PayU https://github.com/payu-intrepos/Android-SDK-Sample-App

更多信息,您可以在此处查看 Android PayU SDK 集成https://github.com/payu-intrepos/Documentations/wiki/6.-Android-SDK-Integration

我认为你没有传递所有参数 我已经使用下面这样的参数完成了它

String merchantKey = "YOUR_KEY";

String mandatoryKeys[] = { PayuConstants.KEY, PayuConstants.AMOUNT, PayuConstants.PRODUCT_INFO,
    PayuConstants.FIRST_NAME, PayuConstants.EMAIL, PayuConstants.TXNID, PayuConstants.SURL,
    PayuConstants.FURL, PayuConstants.USER_CREDENTIALS, PayuConstants.UDF1, PayuConstants.UDF2,
    PayuConstants.UDF3, PayuConstants.UDF4, PayuConstants.UDF5, PayuConstants.ENV};

String mandatoryValues[] = { merchantKey, "10.0", "myproduct", "firstname", "me@itsmeonly.com",
        ""+System.currentTimeMillis(), "https://payu.herokuapp.com/success",
        "https://payu.herokuapp.com/failure", merchantKey+":payutest@payu.in",
        "udf1", "udf2", "udf3", "udf4", "udf5", ""+PayuConstants.PRODUCTION_ENV};

【讨论】:

  • payu支持android 5.0以下的版本吗?
  • 是的,因为它支持,我已经检查了 minimumSdkLevel 为 9 的示例应用程序。
  • 是的,没错,但是当我在 Android 4.3 模拟器中运行该应用程序时,它给了我这样的错误 stackoverflow.com/questions/39995922/…
  • @Mitul Varmora ,我正在发送所有必需的 11 个参数,即金额、电话、service_provider、txnid、email、hash、surl、furl、firstname、productinfo、key..其余是可选的。
  • 如何在angular6/7/8网站上整合payumoney?
猜你喜欢
  • 2021-05-29
  • 2017-06-14
  • 2019-01-25
  • 1970-01-01
  • 1970-01-01
  • 2014-10-12
  • 2019-04-24
  • 1970-01-01
  • 2015-11-02
相关资源
最近更新 更多