Constructor
new VisaCheckout(options)
Do not use this constructor directly. Use braintree-web.visa-checkout.create instead.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object |
The Visa Checkout create options. |
- Source:
Methods
createInitOptions(options) → {object}
Creates an initOptions object from the passed options, applying properties that Braintree needs to transact Visa Checkout.
Braintree will apply these properties if they do not exist on the given options:
apikeyexternalClientIdsettings.payment.cardBrands
Braintree will overwrite settings.dataLevel = 'FULL' to access the full payment method.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
The base Properties
|
- Source:
teardown(callbackopt) → {Promise|void}
Cleanly tear down anything set up by create.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback |
<optional> |
Called once teardown is complete. No data is returned if teardown completes successfully. |
- Source:
Examples
visaCheckoutInstance.teardown();
With callback
visaCheckoutInstance.teardown(function () {
// teardown is complete
});
tokenize(payment, callbackopt) → {Promise|void}
Tokenizes the Visa Checkout payload, returning a payment method nonce.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
payment |
object |
The object that Visa Checkout supplies on Properties
|
|||||||||||||
callback |
callback |
<optional> |
The second argument, |
- Source:
Type Definitions
Address :object
Visa Checkout Address object.
Properties:
| Name | Type | Description |
|---|---|---|
countryCode |
string |
The customer's country code. |
extendedAddress |
string |
The customer's extended address. |
firstName |
string |
The customer's first name. |
lastName |
string |
The customer's last name. |
locality |
string |
The customer's locality. |
postalCode |
string |
The customer's postal code. |
region |
string |
The customer's region. |
streetAddress |
string |
The customer's street address. |
phoneNumber |
string |
The customer's phone number. |
- Source:
tokenizePayload :object
Visa Checkout tokenize payload.
Properties:
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nonce |
string |
The payment method nonce. |
||||||||||||||||||||||||||||||||||||||||||
details |
object |
Additional account details. Properties
|
||||||||||||||||||||||||||||||||||||||||||
description |
string |
A human-readable description. |
||||||||||||||||||||||||||||||||||||||||||
type |
string |
The payment method type, always |
||||||||||||||||||||||||||||||||||||||||||
billingAddress |
VisaCheckout~Address |
The customer's billing address. |
||||||||||||||||||||||||||||||||||||||||||
shippingAddress |
VisaCheckout~Address |
The customer's shipping address. |
||||||||||||||||||||||||||||||||||||||||||
userData |
VisaCheckout~UserData |
Information about the customer. |
||||||||||||||||||||||||||||||||||||||||||
binData |
object |
Information about the card based on the bin. Properties
|
- Source:
UserData :object
Visa Checkout UserData object.
Properties:
| Name | Type | Description |
|---|---|---|
userEmail |
string |
The customer's email address. |
userFirstName |
string |
The customer's first name. |
userLastName |
string |
The customer's last name. |
userFullName |
string |
The customer's full name. |
userName |
string |
The customer's username. |
- Source: