This is an Android payment app sample that works with Web PaymentRequest API.
- SamplePay
- An Android payment app
- A web payment app (The implementation is empty; it can only delegate to the Android app)
- SampleMerchant
- A web merchant site
- Build and run the Android app in the
SamplePay
folder using Android Studio (or other tools or IDEs using Gradle) or run theapp-debug.apk
file included in the repo. - Open the Chrome browser and navigate to https://sample-pay-ss.web.app
- Click on "PAY" button.
The project can be deployed to Firebase Hosting.
|
![]() |
The project can be deployed to Firebase Hosting.
- Install Firebase CLI.
- Create a new Firebase project.
- Edit
SamplePay/.firebaserc
and change the project ID to yours. - Edit
SamplePay/public/manifest.json
and change the domain nams to yours. Also, change the fingerprint SHA256 hash to your SamplePay's app. - Edit
SamplePay/public/payment-manifest.json
and change the domain name to yours. - Edit
SamplePay/firebase.json
and change the domain name to yours. - Run
$ firebase deploy
.