Bho*_*att 5 android transactions android-intent upi google-pay
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();
}
Run Code Online (Sandbox Code Playgroud)
我正在使用正确的 vpa 企业 ID。
G支付错误:
this transaction may be risky. for your safety it cant be completed at this time
Run Code Online (Sandbox Code Playgroud)
目前此代码片段正在测试应用程序中运行。如果它在你的系统中不起作用,请告诉我。
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);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4825 次 |
| 最近记录: |