android - PayUmoney Android 集成问题

标签 android payment-gateway payu payumoney

我正在尝试将 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 向我显示类似的错误;

enter image description here

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

"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)

请给我一些解决方案。

谢谢。

最佳答案

我已经使用此链接示例代码来集成 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};

关于android - PayUmoney Android 集成问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40173992/

相关文章:

ios - 使用 Braintree 支付流程的客户端 IOS 到服务器

php - 在 paypal 中支付成功时分配 2 个用户

ruby-on-rails - Paypal 支付是靠其他用户分摊全部金额吗?

cordova - 将 PayU money 集成到 Ionic + Cordova 混合应用程序

php - 提交 php 表单并从后端重定向

android - 使用 android 媒体播放器进行渐进式视频下载

android - 自签名证书 - 未找到信任 anchor

ios - PayUMoney 支付网关问题

android - Assets 文件夹中的更新图像在启动应用程序时未显示

android - SearchView:键盘不显示按钮完成