Module: Flex

Members

(static) version :String

Current version of the Flex Client-Side SDK.
Type:
  • String

Methods

(inner) createToken(createTokenOptions, responseHandler) → {Token}

Create a token using the Flex API.
Parameters:
Name Type Description
createTokenOptions Object The options for creating a token
responseHandler callback The callback that handles the response
Returns:
Generates a Token to be Used.
Type
Token

Type Definitions

createTokenOptions

Type:
  • Object
Properties:
Name Type Description
options
Properties
Name Type Attributes Description
kid String ID of Flex public key for this operation
cardInfo Object Card information
Properties
Name Type Attributes Description
cardNumber String Card Number
cardType String CyberSource card type code
cardExpiryMonth String <optional>
Card Expiry Month
cardExpiryYear String <optional>
Card Expiry Year
encryptionType 'None' | 'RSAOAEP256' <optional>
Encryption Type
keyStore JWK String <optional>
Formatted keystore
production Boolean <optional>
All tokens are created in test environment unless this is specified

responseHandler(response) → {void}

Parameters:
Name Type Description
response Object the response
Properties
Name Type Description
token Object A Flex Token response if the callback has been successful
error Object An error message will be displayed if an error occurs
Returns:
Type
void