PayPal

PayPal

This class represents a PayPal component. Instances of this class have methods for launching auth dialogs and other programmatic interactions with the PayPal component.

Constructor

new PayPal(options)

Parameters:
Name Type Description
options module:braintree/paypal~createOptions

see paypal.create

Source:

Methods

teardown(errback) → {void}

Cleanly tear down anything set up by create

Parameters:
Name Type Description
errback errorCallback

An errback

Source:
Returns:
Type
void

tokenize(errback) → {PayPal~tokenizeReturn}

Launch the PayPal login flow, returning a nonce payload

Parameters:
Name Type Description
errback errback

The second argument, data, is a tokenizePayload

Source:
Returns:

A handle to close the PayPal checkout frame

Type
PayPal~tokenizeReturn

Type Definitions

tokenizePayload

Type:
  • object
Properties:
Name Type Description
nonce string

The payment method nonce

type string

Always PayPalAccount

details object

Additional PayPal account details

Properties
Name Type Attributes Description
email string

User's email address

firstName string

User's given name

lastName string

User's surname

payerId string

User's PayPal payerId

countryCode string <nullable>

User's 2 character country code

phone string <nullable>

User's phone number (e.g. 555-867-5309)

shippingAddress object <nullable>

User's shipping address details

Properties
Name Type Description
recipientName string

Recipient of postage

line1 string

Street number and name

line2 string

Extended address

city string

City or locality

state string

State or region

postalCode string

Postal code

countryCodeAlpha2 string

2 character country code (e.g. US)

Source:

tokenizeReturn

Type:
  • object
Properties:
Name Type Description
close function

A handle to close the PayPal checkout flow

Source: