ios - How to get response after integrating UPI using hyperlink -
in ios application, need accept payments user. using upi same. have followed following document provided upi
http://www.npci.org.in/documents/upi-linking-specs-ver-1.1_draft.pdf
i have created deeplink stated in document. uiapplication.shared.open used open deeplink url opens installed psp(payment service provider) application in phone(like phonepe, bhim etc)
func paybuttonclicked() { guard let urlstring = "upi://pay?pa=samplevpa@ybl&pn=sample name&am=1&cu=inr".addingpercentencoding(withallowedcharacters: .urlqueryallowed) else { return } guard let url = url(string: urlstring) else { return } if !uiapplication.shared.canopenurl(url) { print("url cannot opened") return } uiapplication.shared.open(url, options: [:], completionhandler: { (success) in print(success) }) } i have registered application custom url schemes , have added scheme upi applicationqueriesscheme in plist file
<array> <dict> <key>cfbundletyperole</key> <string>editor</string> <key>cfbundleurlschemes</key> <array> <string>sampleapp</string> </array> <key>cfbundleurlname</key> <string>com.company.sampleapp</string> </dict> </array> <key>lsapplicationqueriesschemes</key> <array> <string>upi</string> </array> it opening psp application , i'm able make transaction. problem i'm not able response psp application. there no callback method uiapplication.shared.open method. need status of transaction psp application , show status user. appreciated
Comments
Post a Comment