#
TokenDetails
#
Details about the payment card used to create a payment token
TokenDetails
provides the payment card information needed to match a token
returned by the SDK with payment card information input by a buyer.
Properties
tokenDetails.js
JS
JavaScript
try {
const tokenResult = await card.tokenize(verificationDetails);
alert(`Payment for ${tokenResult.details.card.brand},
number ${tokenResult.details.card.last4},
expiration year ${tokenResult.details.card.expYear} was processed`);
} catch (e) {
e.errorList.forEach(err => {
const li = document.createElement('li');
li.innerText = err.message;
document.querySelector('#errors').appendChild(li);
});
}