shipt-google-pay-plugin
v1.2.0
Published
Cordova plugin for Google Pay integration using Stripe
Downloads
1
Maintainers
Readme
Shipt Google Pay Plugin
Cordova plugin to integrate Google pay using Stripe as a payment processor
Installation
$ cordova plugin add https://github.com/newshipt/shipt-google-pay-plugin.git --nofetch
Usage
All the methods return a Promise. Success and error callbacks could also be passed to the functions optionally.
The plugin exposes the functions as window.GooglePay
initGooglePayClient
Initializes the payments client using the given Stripe publishable key. Environment variable is set based on the prefix of the Stripe key. Returns a Promise which resolves to 'Ok' on success.
Important: needs to be called before using any other method
isReadyToPay
Checks if Google Pay is supported and setup correctly. Returns a Promise which resolves to 'Ok' on success.
requestPayment
Initializes the payments client using the given Stripe publishable key. Environment variable is set based on the prefix of the Stripe key. Returns a Promise which resolves to an JSON with the stripeToken property set.
Dependencies
|Dependency| Version| |:--|:--:| |Google Play Service Wallet| 15.0.1 | |Stripe Android| 6.1.2 | |Android Support library v4| 26.0.1 | |Android Support library v7| 26.0.1 |
NPM package
https://www.npmjs.com/package/@shipt/shipt-google-pay-plugin