braintree-web/google-payment

A component to integrate with Google Pay.

Note: This component is currently in beta and the API may include breaking changes when upgrading. Please review the Changelog for upgrade steps whenever you upgrade the version of braintree-web.

Source:

Members

(static) VERSION :string

The current version of the SDK, i.e. 3.28.0.

Source:

Methods

(static) create(options, callbackopt) → {Promise|void}

Parameters:
Name Type Attributes Description
options object

Creation options:

Properties
Name Type Description
client Client

A Client instance.

callback callback <optional>

The second argument, data, is the GooglePayment instance. If no callback is provided, create returns a promise that resolves with the GooglePayment instance.

Source:

(static) isSupported() → {Boolean}

Returns true if Google Pay is supported in this browser.

Source:
Example
if (braintree.googlePayment.isSupported()) {
   // Add Google Pay button to page and
   // initialize Google Pay component
} else {
   // Do not initialize Google Pay component
}