从我的安卓应用调用谷歌支付意图时收到错误"You have exceeded the maximum transaction amount set by your bank"



我在安卓应用程序中集成谷歌支付时遇到了这个奇怪的问题。当我发送超过2000(INR(的金额时,我得到错误";您已超过您的银行设定的最高交易金额";尽管我没有交易任何金额。当我尝试直接从谷歌支付发送金额时,它是有效的。它也适用于低于2000卢比的金额,但不会超过2000卢比。

这是代码iiiiii

val uri: Uri = Uri.Builder()
.scheme("upi")
.authority("pay")
.appendQueryParameter("pa", MY_UPI_ID)
.appendQueryParameter("pn", MY_USER_NAME)
//.appendQueryParameter("mc", "1234")
//.appendQueryParameter("tr", "123456789")
.appendQueryParameter("tn", "test transaction note")
.appendQueryParameter("am", "2500.00")
.appendQueryParameter("cu", "INR")
//.appendQueryParameter("url", "https://test.merchant.website")
.build()


val intent = Intent(Intent.ACTION_VIEW)
intent.data = uri
intent.setPackage(GOOGLE_PAY_PACKAGE_NAME)
startActivityForResult(intent, PAY_REQUEST_CODE)

我读了很多博客和文档,但没有找到任何解决方案。有什么帮助或建议吗?

Uri uri = Uri.parse("upi://pay").buildUpon()
.appendQueryParameter("pa", upiId)  // google pay business id
.appendQueryParameter("pn", name)
.appendQueryParameter("mc", "")            /// 1st param - use it (it was commented on my earlier tutorial)
//.appendQueryParameter("tid", "02125412")
.appendQueryParameter("tr", "25584584")   /// 2nd param - use it (it was commented on my earlier tutorial)
.appendQueryParameter("tn", note)
.appendQueryParameter("am", amount)
.appendQueryParameter("cu", "INR")
//.appendQueryParameter("refUrl", "blueapp")
.build();

你需要做两个修改。

  1. 仅使用谷歌支付业务应用程序ID
  2. 使用";mc";以及";tr〃;intent调用中的param

";mc"-商户代码(可以为空(。"tr〃-事务引用id(可以是任何随机数(。在这里工作参考岗位

相关内容

最新更新