gpt4 book ai didi

android - Google Pay UPI 集成在 android 中不起作用

转载 作者:行者123 更新时间:2023-12-04 11:44:13 24 4
gpt4 key购买 nike

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

 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

最佳答案

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

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

关于android - Google Pay UPI 集成在 android 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66239372/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com