定制 cliffom/tokenex 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cliffom/tokenex

最新稳定版本:v0.5.1

Composer 安装命令:

composer require cliffom/tokenex

包简介

TokenEx API

README 文档

README

A convenient PHP package for the TokenEx API

Installation

The fastest way to get up and running is to install via composer:

$ 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:

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:

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.

License

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

统计信息

  • 总下载量: 382
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固