- строит URI,
- создает намерение,
- StarsActivityForResult для запуска приложения Gpay с входными данными
- также получите ответ от намерения.
Код: Выделить всё
Uri uri =
new Uri.Builder()
.scheme("upi")
.authority("pay")
.appendQueryParameter("pa", "your-merchant-vpa@xxx")
.appendQueryParameter("pn", "your-merchant-name")
.appendQueryParameter("mc", "your-merchant-code")
.appendQueryParameter("tr", "your-transaction-ref-id")
.appendQueryParameter("tn", "your-transaction-note")
.appendQueryParameter("am", "your-order-amount")
.appendQueryParameter("cu", "INR")
.appendQueryParameter("url", "your-transaction-url")
.build();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.setPackage(GOOGLE_PAY_PACKAGE_NAME);
activity.startActivityForResult(intent, GOOGLE_PAY_REQUEST_CODE);
- https://developers. google.com/pay/india/api/android/in-app-pays
- https://developers.google.com/pay/india/api/ios/in-app- платежи
Подробнее здесь: https://stackoverflow.com/questions/791 ... n-net-maui