It is developed by Google for online, contactless and in-person purchases via mobile devices. Import 'package:url_launcher/url_launcher.dart' Ĭlass MyApp extends StatelessWidget build(BuildContext context) ).Google Pay, or GPay as it is locally known in India, is a mobile wallet, payment gateway, and United Payments Interface (UPI) enabled payment system. One main problem with this method is that this doesn't give any call back to check whether the payment has been successful or failed. I read somewhere that only INR is supported now. pa: UPI id of the requesting personĬu: Currency. You need a package called url_launcher to be added in pubspec to this get work.Ĭheck the documentation here to see the details of parameters used in the URL.Īll parameters are required. If you are using flutter this is how it can be done. I believe the parameter name you are after is pa. tPackage(GOOGLE_PAY_PACKAGE_NAME) Īctivity.startActivityForResult(intent, GOOGLE_PAY_REQUEST_CODE) Intent intent = new Intent(Intent.ACTION_VIEW) appendQueryParameter("url", "your-transaction-url") appendQueryParameter("am", "your-order-amount") appendQueryParameter("tn", "your-transaction-note") appendQueryParameter("tr", "your-transaction-ref-id") appendQueryParameter("mc", "your-merchant-code") appendQueryParameter("pa", "your-merchant-name") You can also refer to Google Pay documentation on how to integrate with in-app payments: String GOOGLE_PAY_PACKAGE_NAME = "." Disclaimer: I don't live in India and don't have access to UPI to verify for myself.Ĭonsider using the UPI linking specification ( upi://) to create UPI links for use with UPI compatible applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |