2

如何通过应用发送 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();}
}
4

1 回答 1

2
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);
于 2019-10-21T17:11:56.627 回答