Members
(static) VERSION :string
The current version of the SDK, i.e. 3.92.1
.
- Source:
Methods
(static) create(options, callbackopt) → {Promise|void}
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Creation options: Properties
|
||||||||||||||||||||||||||||||||||||||||||||||
callback |
callback |
<optional> |
The second argument, |
- Source:
Examples
braintree.threeDSecure.create({
client: clientInstance,
version: '2'
}, function (createError, threeDSecure) {
// set up lookup-complete listener
threeDSecure.on('lookup-complete', function (data, next) {
// check lookup data
next();
});
// using Hosted Fields, use `tokenize` to get back a credit card nonce
threeDSecure.verifyCard({
nonce: nonceFromTokenizationPayload,,
bin: binFromTokenizationPayload,
amount: '100.00'
}, function (verifyError, payload) {
// inspect payload
// send payload.nonce to your server
});
});
// must have the boostrap js, css and jquery files on your page
braintree.threeDSecure.create({
client: clientInstance,
version: '2-bootstrap3-modal'
}, function (createError, threeDSecure) {
// set up lookup-complete listener
threeDSecure.on('lookup-complete', function (data, next) {
// check lookup data
next();
});
// using Hosted Fields, use `tokenize` to get back a credit card nonce
// challenge will be presented in a bootstrap 3 modal
threeDSecure.verifyCard({
nonce: nonceFromTokenizationPayload,
bin: binFromTokenizationPayload,
amount: '100.00'
}, function (verifyError, payload) {
// inspect payload
// send payload.nonce to your server
});
});
braintree.threeDSecure.create({
client: clientInstance,
version: '2-inline-iframe'
}, function (createError, threeDSecure) {
// set up lookup-complete listener
threeDSecure.on('lookup-complete', function (data, next) {
// check lookup data
next();
});
// set up iframe listener
threeDSecure.on('authentication-iframe-available', function (event, next) {
var element = event.element; // an html element that contains the iframe
document.body.appendChild(element); // put it on your page
next(); // let the sdk know the element has been added to the page
});
// using Hosted Fields, use `tokenize` to get back a credit card nonce
threeDSecure.verifyCard({
nonce: nonceFromTokenizationPayload,,
bin: binFromTokenizationPayload,
amount: '100.00'
}, function (verifyError, payload) {
// inspect payload
// send payload.nonce to your server
});
});