【问题标题】:Google Pay UPI Integration not working in androidGoogle Pay UPI 集成在 Android 中不起作用
【发布时间】:2021-05-20 04:33:25
【问题描述】:

GPay 集成在 2 天前完全正常,但现在它在 gpay 应用程序中显示相同的错误。要求 gpay 付款的意图不起作用。 我在几天前成功完成了交易。但现在它不起作用。任何帮助,将不胜感激!提前致谢。

我的代码

 uriapp = new Uri.Builder()
            .scheme("upi")
            .authority("pay")
            .appendQueryParameter("pa", getString(R.string.vpa))
            .appendQueryParameter("pn", getString(R.string.payee))
            .appendQueryParameter("tr", orderId)
            .appendQueryParameter("tn", description)
            .appendQueryParameter("am", String.valueOf(amount))
            .appendQueryParameter("cu", "INR")
            .build();

 Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(uriapp);
        intent.setPackage(model.getPackageName());
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivityForResult(intent, GOOGLE_REQUEST_CODE);
        } else {
            Toast.makeText(this, "This payment mode is not available on your device.", Toast.LENGTH_LONG).show();
        }

我使用的是正确的 vpa 业务 ID。

GPay 错误:

this transaction may be risky. for your safety it cant be completed at this time

【问题讨论】:

  • 你有什么解决办法吗,我也面临同样的问题,而从意图做
  • @MohdQasim 不,我没有找到任何解决方案。
  • 我与谷歌支付支持进行了核实,他们说商家 ID 正在接受不同 UPI 应用程序的付款,这就是原因。如果可能的话,您可以使用不同的商家 ID 进行检查!
  • 你发现这个问题了吗
  • @saikrupa 还没有。

标签: android android-intent transactions google-pay upi


【解决方案1】:

目前这个 sn-p 正在测试应用程序中工作。让我知道它是否不适用于您的。

    private static final int TEZ_REQUEST_CODE = 123;

    private static final String GOOGLE_TEZ_PACKAGE_NAME = 
    "com.google.android.apps.nbu.paisa.user";

Uri uri =
    new Uri.Builder()
        .scheme("upi")
        .authority("pay")
        .appendQueryParameter("pa", "test@okbizaxis")
        .appendQueryParameter("pn", "Test")
        .appendQueryParameter("mc", "1234")
        .appendQueryParameter("tr", "1234")
        .appendQueryParameter("tn", "test")
        .appendQueryParameter("am", "10")
        .appendQueryParameter("cu", "INR")
        .appendQueryParameter("url", "")
        .build();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.setPackage(GOOGLE_TEZ_PACKAGE_NAME);
startActivityForResult(intent, TEZ_REQUEST_CODE);

【讨论】:

  • doesn't work 说“您目前无法支付这笔款项”
猜你喜欢
  • 2020-03-23
  • 2021-06-08
  • 2022-07-04
  • 2020-03-20
  • 1970-01-01
  • 2021-10-27
  • 1970-01-01
  • 2016-05-06
  • 2021-03-06
相关资源
最近更新 更多