Cordova/Phonegap plugin for Android for Google Pay - Issuers
This plugin requires [email protected]+
(CLI) and cordova-android@8+
(Android platform).
cordova plugin add https://github.com/andregrillo/google-tapandpay.git
Starts the push tokenization flow in which the issuer provides most or all card details needed for Google Pay to get a valid token. Tokens added using this method are added to the active wallet.
let opc = "eyJhb...0zfF20w";
let tsp = "VISA";
let clientName = "John Doe";
let lastDigits = "1234";
let address = {
name:"John Doe",
address: "St. Some Street",
locality: "London",
administrativeArea: "Sutton",
countryCode:"UK",
postalCode: "99999",
phoneNumber: "9999999999"
};
GooglePayIssuer.prototype.pushProvision(opc,tsp,clientName,lastDigits,address,onSuccess,onError);
Return the token status for a token in the active wallet.
let tsp = "VISA";
let tokenReferenceId = "dP4Pwaq7WQY:APA9";
GooglePayIssuer.prototype.getTokenStatus(tsp,tokenReferenceId,onSuccess,onError);
Return the current environment Google Pay is configured to use.
GooglePayIssuer.prototype.getEnvironment(onSuccess,onError);
Returns the Wallet ID of the active wallet. If there is no active wallet, a error is throw.
GooglePayIssuer.prototype.getActiveWalletID(onSuccess,onError);
Returns the stable hardware ID of the device. Each physical Android device has a stable hardware ID which is consistent between wallets for a given device. This ID will change as a result of a factory reset.
GooglePayIssuer.prototype.getStableHardwareId(onSuccess,onError);
Thanks to Raphael Godoi and Guilherme Rodrigues