Reputation: 65
I was trying to implement UPI intent, but whenever i am paying it's saying maximum limit exceeded in google pay, in phone pe, It's showing due to security issue, you cannot pay with this bank account. Please help me out. here is my code.
Uri UPI = Uri.parse("upi://pay").buildUpon()
.appendQueryParameter("pa", "") //rList.get(i).upi_id
.appendQueryParameter("pn", "") //rList.get(i).username
.appendQueryParameter("tn", "TEST") //rList.get(i).paylist_name
.appendQueryParameter("tr", ""+StaticValues.transactionId)
.appendQueryParameter("tid", ""+StaticValues.transactionId)
.appendQueryParameter("am", ""+rList.get(i).payble_amount)
.appendQueryParameter("cu", "INR")
//.appendQueryParameter("orgid", "000000")
//.appendQueryParameter("mode", "04")
.build();
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(UPI);
Intent chooser = Intent.createChooser(intent, "Pay with...");
startActivityForResult(chooser, 1);
Upvotes: 6
Views: 9434
Reputation: 470
Similar issue here and the solution seems to be to create a merchant account (business account) and pass the parameters from that account (including merchant id "mc") for payment processing. See UPI specifications by Google here. That being said, I tested it with only four parameters, pa, pn, tn and am but I generated a QR code and scanned from GPay app and it worked without an issue.
My conclusion is that the security measure applies to in-app generated upi payment URI only and if we are scanning from an UPI payment app, these additional parameters are not considered.
If we could generate the QR code and make a payment through scanning from the UPI app it would work. But I don't think we can make another app scan our generated QR code.
Edit 27-08-2021
I was able to successfully make an UPI payment to a non merchant account but I cannot do an automatic payment verification. If you would like to resort to this method then read on.
Limitations:
How to do:
I know this is not even close to an ideal solution but I have tried with the registered merchant account and simple user account and it works on both cases. I tried to pass the merchant account parameters I found in addition to the above mentioned parameters but it didn't work for some reason. I will update if I found the cause of it in future.
Upvotes: 4