问题
I am working on opening GooglePay, PhonePe or PayTM app when the user taps on Pay via UPI.
According to NPCI docs https://www.npci.org.in/sites/default/files/UPI%20Linking%20Specs_ver%201.6.pdf, when I try to open upi://pay?parm-name=param-value¶m-name=pram-value&... or essentially upi:// from mobile browser, it randomly opens any UPI installed application (whatsApp in my case) and if whatsApp isn't installed, it opened PayTM.
I want a behaviour in my app where if a user taps on Pay via GooglePay, GooglePay app should open with prefilled amount and merchant linked to it just like how CRED app does it.
How can I achieve a similar functionality?
PS I tried tez://, it opens GooglePay app but it isn't documented anywhere so I don't know if I can rely on it.
Edit: Can I achieve it without using SDK? I want to use only URL scheme to achieve it.
回答1:
This isn't documented either but the two schemes that you might want to try are:
tez://upi/*
gpay://upi/*
If I had to take a guess about which one will be better supported it would be the gpay
option.
Update
I've tried and it doesn't look like the URI's I provided above work. See https://internal-absorbed-celsius.glitch.me/
来源:https://stackoverflow.com/questions/61207671/upi-integration-using-deeplinking-in-ios