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
- Download and install app-debug.apk
- Open the Chrome browser and navigate to https://sample-pay-ss.firebaseapp.com
- Click on "PAY" button.
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
.
- Import the project path (
SamplePay/
) to Android Studio. - Modify
SamplePay/gradle.properties
and change the domain name to yours. - Run
The project can be deployed to Firebase Hosting.
- Install Firebase CLI.
- Create a new Firebase project.
- Edit
SampleMerchant/.firebaserc
and change the project ID to yours. - Edit
SampleMerchant/public/index.html
and change thesupportedMethods
to your SamplePay's domain. - Run
$ firebase deploy
.