Methods
(static) tokenize(options, callbackopt) → {Promise.<(tokenizePayload|error)>}
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
All options for intiating the SEPA payment flow. Properties
|
|||||||||||||||||||||||||||||
callback |
callback |
<optional> |
The first argument is an error object, where the second is a tokenizePayload |
- Source:
Example
button.addEventListener('click', function () {
var tokenizeInputs = {
accountHolderName: "some-accnt-holder-name",
customerId: "a-customer-id",
iban: "a-full-iban",
mandateType: "ONE_OFF",
countryCode: "LI",
merchantAccountId: "a-merchant-account-id"
}
sepaInstance.tokenize(tokenizeInputs).then(function (payload) {
// Submit payload.nonce to your server
}).catch(function(tokenizationErr) {
// Handle errors in the flow
})
})
Type Definitions
callback(erropt, nullable, dataopt, nullable) → {void}
The Node.js-style callback pattern used throughout the SDK.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
BraintreeError |
<optional> <nullable> |
|
data |
any |
<optional> <nullable> |
The successful result of the asynchronous function call (if data exists). |