wucdbm / credit-card-guesser
另一种信用卡类型猜测工具
v0.0.1
2018-08-13 22:09 UTC
Requires
- php: >=7.1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.8
- wucdbm/php-cs-fixers: ^0.3.0
This package is auto-updated.
Last update: 2024-09-16 08:39:06 UTC
README
<?php // Guess card type $guesser = new \Wucdbm\CreditCardGuesser\TypeGuesser(); try { $type = $guesser->guess('1234 1234 1234 1234'); } catch (\Wucdbm\CreditCardGuesser\Exception\UnknownCardTypeException $e) { // failed to match any of the built-in types } // Change Code for a particular card type $guesser->setCode('Visa', 'SomeOtherCode'); // Change Regex for a particular card type $guesser->setRegex('Visa', '/anotherRegex1234567/'); // Add another card type $guesser->addCard('VisaElectron', 'VI', '/someRegex/'); // Remove card type $guesser->removeCard('Visa');
关于正则表达式的说明
以下库中收集了正则表达式
贡献
如果您需要将另一种卡类型包含在标准配置中,请提交一个PR