Closed subhojit-me closed 3 years ago
after some study am successfully able to find that QR Code for UPI payment can be done by passing string in upi:// format with parameter specified in this doc
Thanks for pointing me to the UPI standard. Will add it to the todo list.
@subhojit-me did you really mean upi:// or did you mean payto:// scheme? I can only find information about payto:// uris, but not about upi://...
Well, i used a trick about payto, did some research also to figured it out.
So i tried the text as Payload in my code like this
var payload = $@"upi://pay?cu={upiParams.CURRENCY_CODE}&pa={upiParams.RECEIVER_VPA}&pn={upiParams.RECEIVER_NAME}&tn={upiParams.PAYMENT_NOTE}&am={upiParams.AMOUNT}";
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode(payload, QRCodeGenerator.ECCLevel.Q);
var qrCode = new Base64QRCode(qrCodeData);
Now its working,
Please mention me if am doing anything wrong.
[ ] Bug
[x] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement
Expected Behavior
Tring to generate a QR Code that can be used to pay via UPI
Current Behavior
there is no Payload Generator that supports UPI, if exists and am missing that please correct me.