Card Flight

Cordova Card Flight Plugin
pgdaniel0.1.02
platforms: ios
$ cordova plugin add org.apache.cordova.cardflight

Usage

Configuration

cardFlight.configure(options)

Example

cardFlight.configure({
  apiToken: "<Card Flight API Token>",
  accountToken: "<Account Token>",
  tokenize: true
});

Swipe card

cardFlight.beginSwipe(func(<card>), func(<error>)[, options])

Example

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"
});

Object Reference

Card

{
  cardToken: "<token on merchant>"
}

Error

{
  message: "<some descriptive error message>",
  type: "<some type in Error.TYPES>"
}