2017 © Pedro Peláez
 

library tokenex

TokenEx API

image

cliffom/tokenex

TokenEx API

  • Tuesday, March 1, 2016
  • by cliffom
  • Repository
  • 1 Watchers
  • 0 Stars
  • 270 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Tokenex Build Status Circle CI

A convenient PHP package for the TokenEx API, (*1)

Installation

The fastest way to get up and running is to install via composer:, (*2)

$ composer require cliffom/tokenex

Usage

Tokenization

Initialize your tokenizer

require __DIR__ . '/vendor/autoload.php';
use Cliffom\Tokenex\Tokenizer;

$tokenizer = new Tokenizer($TOKENEX_API_BASE_URL, $TOKENEX_ID, $TOKENEX_API_KEY);

Create a token

// From a credit card number
$token = $tokenizer->token_from_ccnum(4242424242424242);

// From arbitrary data
$token = $tokenizer->tokenize("This is random data containing 3 numbers less than 10");

Validate a token

$tokenizer->validate_token($token); // true or false

Delete a token

$tokenizer->delete_token($token); // true or false

Errors and References

Each action call will return a reference ID that can be used to lookup a call in the TokenEx dashboard. Unsuccessful calls will also return an error describing the problem. Each can be accessed via:, (*3)

var_dump($tokenizer->error); // array, empty if no errors
var_dump($tokenizer->reference_number); // string

Development

Use the following docker-compose commands to install dependencies and run the specs:, (*4)

docker-compose run --rm tokenex composer install
docker-compose up

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/cliffom/tokenex-php., (*5)

License

All code is open source under the terms of the [MIT License](MIT License), (*6)

The Versions

01/03 2016

dev-master

9999999-dev

TokenEx API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Clifford

tokenization tokenex

27/02 2016

v0.5.1

0.5.1.0

TokenEx API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Michael Clifford

tokenization tokenex

26/02 2016

v0.5.0

0.5.0.0

TokenEx API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Michael Clifford

tokenization tokenex

26/02 2016

v0.1.0

0.1.0.0

TokenEx API

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Michael Clifford

tokenization tokenex