cardFlight.configure(options)
cardFlight.configure({
apiToken: "<Card Flight API Token>",
accountToken: "<Account Token>",
tokenize: true
});
cardFlight.beginSwipe(func(<card>), func(<error>)[, options])
var success = function (card) {
console.log("swipe successful", card.cardToken);
}
var error = function (error) {
console.log("swipe error", error.message)
}
cardFlight.beginSwipe(success, error, {
swipeMessage: "Begin Swipe",
cancelDialogButtonText: "Okay"
});
{
cardToken: "<token on merchant>"
}
{
message: "<some descriptive error message>",
type: "<some type in Error.TYPES>"
}