braintree-web/google-payment

A component to integrate with Pay with Google.

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.26.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 Pay with Google is supported in this browser.

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