npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

capacitor-google-pay

v5.0.3

Published

Google Pay In-App Provisioning

Downloads

284

Readme

capacitor-google-pay

Google Pay In-App Provisioning

Install

npm install capacitor-google-pay
npx cap sync

Prepare Lib

  1. Get access to Android Push Provisioning API

  2. Set up your environment and Integrate the SDK

  3. Unzip downloaded m2repository to <path to sdk.dir>/extras/google/m2repository,

    For example: ~/Library/Android/sdk/extras/google/m2repository

  4. Request Push Provisioning API Access

  5. Here we go

API

addListener('registerDataChangedListener', ...)

addListener(eventName: 'registerDataChangedListener', listenerFunc: (response: any) => void) => PluginListenerHandle

Event called when an action is performed on a pusn notification.

| Param | Type | Description | | ------------------ | ------------------------------------------ | -------------------------------------- | | eventName | 'registerDataChangedListener' | pushNotificationActionPerformed. | | listenerFunc | (response: any) => void | callback with the notification action. |

Returns: PluginListenerHandle

Since: 1.0.0


removeAllListeners()

removeAllListeners() => void

getEnvironment()

getEnvironment() => any

returns the environment (e.g. production or sandbox)

Returns: any

Since: 1.0.0


getStableHardwareId()

getStableHardwareId() => any

returns the stable hardware ID of the device

Returns: any

Since: 1.0.0


getActiveWalletID()

getActiveWalletID() => any

returns the ID of the active wallet

Returns: any

Since: 1.0.0


createWallet()

createWallet() => any

Initializes create wallet

Returns: any

Since: 4.0.1


getTokenStatus(...)

getTokenStatus(options: GooglePayTokenOptions) => any

returns the status of a token with a given token ID

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------- | ------------- | | options | GooglePayTokenOptions | Token Options |

Returns: any

Since: 1.0.0


listTokens()

listTokens() => any

returns a list of tokens registered to the active wallet

Returns: any

Since: 1.0.0


isTokenized(...)

isTokenized(options: GooglePayIsTokenizedOptions) => any

Starts the push tokenization flow

| Param | Type | | ------------- | ----------------------------------------------------------------------------------- | | options | GooglePayIsTokenizedOptions |

Returns: any

Since: 1.0.0


pushProvision(...)

pushProvision(options: GooglePayProvisionOptions) => any

Starts the push tokenization flow

| Param | Type | | ------------- | ------------------------------------------------------------------------------- | | options | GooglePayProvisionOptions |

Returns: any

Since: 1.0.0


requestSelectToken(...)

requestSelectToken(options: GooglePayTokenOptions) => any

Requests setting token as default in Google Pay

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------- | ------------- | | options | GooglePayTokenOptions | Token Options |

Returns: any

Since: 1.0.0


requestDeleteToken(...)

requestDeleteToken(options: GooglePayTokenOptions) => any

Requests deleting token from Google Pay

| Param | Type | Description | | ------------- | ----------------------------------------------------------------------- | ------------- | | options | GooglePayTokenOptions | Token Options |

Returns: any

Since: 4.0.13


isGPayDefaultNFCApp()

isGPayDefaultNFCApp() => any

Check if Google Pay is Default NFC payment App

Returns: any

Since: 4.0.4


setGPayAsDefaultNFCApp()

setGPayAsDefaultNFCApp() => any

Sets Google Pay as Default NFC payment App

Returns: any

Since: 4.0.4


registerDataChangedListener()

registerDataChangedListener() => any

returns the status of a token with a given token ID

Returns: any

Since: 1.0.0


Interfaces

PluginListenerHandle

| Prop | Type | | ------------ | ------------------------- | | remove | () => any |

GooglePayTokenOptions

| Prop | Type | Description | Since | | ---------------------- | ------------------- | ----------------------------------------------------------------------------------------- | ----- | | tsp | string | Sets the TSP that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 | | tokenReferenceId | string | token registered to the active wallet | 1.0.0 |

GooglePayIsTokenizedOptions

| Prop | Type | Description | Since | | ---------------- | ------------------- | ------------------------------------------------------------------------------------------------ | ----- | | tsp | string | Sets the TSP that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 | | lastDigits | string | Sets the lastDigits that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 |

GooglePayProvisionOptions

| Prop | Type | Description | Since | | ---------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ----- | | opc | string | Sets Opaque Payment Card binary data. | 1.0.0 | | tsp | string | Sets the TSP that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 | | clientName | string | Sets the clientName that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 | | lastDigits | string | Sets the lastDigits that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 | | address | GooglePayAddress | Sets the address that should be used for the tokenization attempt (see TokenServiceProvider). | 1.0.0 |

GooglePayAddress

| Prop | Type | Description | Since | | ------------------------ | ------------------- | ------------------- | ----- | | name | string | Address name | 1.0.0 | | address1 | string | Full address | 1.0.0 | | address2 | string | Apartment/Office | 1.0.0 | | locality | string | Locality | 1.0.0 | | administrativeArea | string | Administrative area | 1.0.0 | | countryCode | string | Country code | 1.0.0 | | postalCode | string | Postal code | 1.0.0 | | phoneNumber | string | Phone number | 1.0.0 |

Enums

TokenStatusReference

| Members | Value | | --------------------------------------------- | --------------- | | TOKEN_STATE_UNTOKENIZED | 1 | | TOKEN_STATE_PENDING | 2 | | TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION | 3 | | TOKEN_STATE_SUSPENDED | 4 | | TOKEN_STATE_ACTIVE | 5 | | TOKEN_STATE_FELICA_PENDING_PROVISIONING | 6 | | TOKEN_STATE_NOT_FOUND | -1 |