cordova-plugin-google-pay-et

0.0.7 • Public • Published

cordova-plugin-google-pay-et

Cordova plugin for Google pay integration

Notes

This plugin only supports Android.

This plugin will add these dependencies to your build.gradle file:

com.google.android.gms:play-services-wallet:18.0.0
com.android.support:support-v4:27.0.2
com.android.support:appcompat-v7:27.1.1

Installation

cordova plugin add cordova-plugin-google-pay-et
ionic cordova plugin add cordova-plugin-google-pay-et

Usage

This plugin puts the functions into window.gpay. All functions return a promise.

 - Required to request payments
 - If test key is provided, then payments are completed in `ENVIRONMENT_TEST` mode, and `ENVIRONMENT_PRODUCTION` mode if the live key is given
 - If you attempt any of the below functions without calling this first, they will throw an error

```javascript
gpay.isReadyToPay()
  • Used to test if the appropriate payment method is available on the current device.
  • Resolves if appropriate payment method is available
  • Rejects if not, or if it encounters an error
gpay.requestPayment(totalPrice, currency)
  • Initiates the payment journey for the user to complete.
  • totalPrice must be a string representation of the total price - e.g. for £10.78, it would be 10.78
  • currency must be a valid ISO 4217 currency code for the transaction
  • Resolves when the journey is complete, with the stripe token
  • Rejects if an error occurs

Contributing

PRs welcome!

License

MIT

CREDIT

Taken code from below link and then modified as per need https://github.com/jack828/cordova-plugin-stripe-google-apple-pay

/cordova-plugin-google-pay-et/

    Package Sidebar

    Install

    npm i cordova-plugin-google-pay-et

    Weekly Downloads

    5

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    40 kB

    Total Files

    11

    Last publish

    Collaborators

    • earth10