scolib/bankcard
最新稳定版本:v1.0.0
Composer 安装命令:
composer require scolib/bankcard
包简介
根据银行卡号识别所属银行以及卡类型
关键字:
README 文档
README
根据银行卡号识别所属银行以及卡类型
目前支持两种识别方式:阿里API和正则,默认使用阿里的API
安装
Via Composer
$ composer require scolib/bankcard
使用
$bankcard = new Sco\Bankcard\Bankcard(); //$bankcard = new Sco\Bankcard\Bankcard(new Sco\Bankcard\Providers\RegexProvider()); // 返回一个Sco\Bankcard\Info实例 // 如果未识别 抛出异常 Sco\Bankcard\Exceptions\ValidationException $info = $bankcard->info($cardNo); // 银行卡信息(数组) $info->getBankInfo(); // 所属银行代号 $info->getBankCode(); // 所属银行名称 $info->getBankName(); // 所属银行icon(如果有) $info->getBankIcon(); // 卡类型代号 $info->getCardType(); // 卡类型名称 $info->getCardTypeName();
Change log
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email slice1213@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 1.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-14