braintree-web/paypal-checkout

A component to integrate with the PayPal Checkout.js library.

Source:

Members

(static) VERSION :string

The current version of the SDK, i.e. 3.46.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 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.

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 checkout.js
}).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. Checkout.js now falls back to a modal if popups are not supported.

Source: