A component to integrate with the PayPal JS SDK.
- Source:
Members
(static) VERSION :string
The current version of the SDK, i.e. 3.85.3
.
- 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
|
||||||||||||||||||||||||||
callback |
callback |
<optional> |
The second argument, |
- 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: