'How to include UPI payment URL inside Google QR Code generator URL?
I want to include "upi://pay?pa=8871459686@paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu" this UPI payment link inside Google QR code generator link but when I am adding this link inside the URL ("https://chart.googleapis.com/chart?cht=qr&chs=315x315%26chl=") I am only getting "8871459686@paytm" after scanning QR code.
Please can anyone tell me what will be the right way to add this "upi://pay?pa=8871459686@paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu" inside google QR code generator link.
Solution 1:[1]
Since Google api is using "get" method, you should encode your parameter ("upi://pay?pa=8871459686@paytm&pn=Paytm%20Merchant&mc=abc&mode=02&orgid=000000&paytmqr=abcdefg&sign=abc+xyz/pqr/+stu")
In JavaScript & PHP, you can urlencode() function to encode the parameters.
variable = urlencode(text)
Send URL encoded variable value in google API URL.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | manasGain |