braintree-web/paypal-checkout

A component to integrate with the PayPal JS SDK.

Source:

Members

(static) VERSION :string

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

Source:

Methods

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

There are two ways to integrate the PayPal Checkout component. See the PayPal Checkout constructor documentation for more information and examples.

Parameters:
Name Type Attributes Description
options object

Creation options:

Properties
Name Type Attributes Default Description
client Client <optional>

A Client instance.

authorization string <optional>

A tokenizationKey or clientToken. Can be used in place of options.client.

merchantAccountId string <optional>

A non-default merchant account ID to use for tokenization.

autoSetDataUserIdToken boolean <optional>
false

Whether or not to render the PayPal SDK button with a customer's vaulted PayPal account. Must be used in conjunction with a Client Token generated with a customer id.

callback callback <optional>

The second argument, data, is the PayPalCheckout instance.

Source:
Example
braintree.client.create({
  authorization: 'authorization'
}).then(function (clientInstance) {
  return braintree.paypalCheckout.create({
    client: clientInstance
  });
}).then(function (paypalCheckoutInstance) {
  // set up the PayPal JS SDK
}).catch(function (err) {
  console.error('Error!', err);
});

(static) isSupported() → {Boolean}

Returns true if PayPal Checkout supports this browser.

Deprecated:
  • Previously, this method checked for Popup support in the browser. The PayPal JS SDK now falls back to a modal if popups are not supported.

Source: