Constructor
new UnionPay(options)
Do not use this constructor directly. Use braintree-web.unionpay.create instead.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | see unionpay.create |
- Source:
Methods
enroll(options, callback) → {void}
Enrolls a UnionPay card. Only call this method if the card needs to be enrolled. Use fetchCapabilities to determine if the user's card needs to be enrolled.
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | UnionPay enrollment options Properties
|
||||||||||||||||||||||||
callback |
errback | The second argument, |
- Source:
fetchCapabilities(options, errback) → {void}
Fetches the capabilities of a card, including whether or not the card needs to be enrolled before use. If the card needs to be enrolled, use enroll
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
object | UnionPay fetchCapabilities options Properties
|
||||||
errback |
errback | The second argument, |
- Source:
tokenize(options, callback) → {void}
Tokenizes a UnionPay card, returning a nonce payload!
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | UnionPay tokenization options Properties
|
|||||||||||||||||||||||||||||||||
callback |
errback | The second argument, |
- Source:
Type Definitions
enrollPayload :object
Properties:
| Name | Type | Description |
|---|---|---|
unionPayEnrollmentId |
string | UnionPay enrollment ID |
- Source:
fetchCapabilitiesPayload :object
Properties:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
isUnionPay |
boolean | Determines if this card is a UnionPay card |
|||||||||
isDebit |
boolean | Determines if this card is a debit card |
|||||||||
unionPay |
object | UnionPay specific properties Properties
|
- Source:
tokenizePayload :object
Properties:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
nonce |
string | The payment method nonce |
|||||||||
type |
string | Always |
|||||||||
details |
object | Additional account details Properties
|
|||||||||
description |
string | A human-readable description |
- Source: