如何通过Android Java发送Google Pay“请求”,例如Amazon Bhim Pay在线支付

时间:2019-10-21 17:07:03

标签: java android payment google-pay upi

如何通过应用发送Google Pay或Bhim UPI请求。我知道这一点,但是我想发送付款请求:

try {
    Uri uri = Uri.parse("upi://pay?pa="+payeeAddress+"&pn="+payeeName+"&tn="+transactionNote+
    "&am="+amount+"&cu="+currencyUnit);
    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    startActivityForResult(intent,1);}

catch (Exception e) {
    Toast.makeText(MainActivity.this, "Sorry! Please Install GPAY or BHIM", Toast.LENGTH_SHORT).show();e.printStackTrace();}
}

1 个答案:

答案 0 :(得分:1)

Uri uri = Uri.parse("upi://pay? 
pa=payee_address&pn=payee_name&tn=transaction_name&am=1&cu=INR&url=url");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setClassName("in.org.npci.upiapp","in.org.npci.upiapp.HomeActivity");
startActivityForResult(intent,1);