|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace mtopcard;
|
|
namespace mtopcard;
|
|
|
|
|
|
|
|
+use Log;
|
|
|
|
+
|
|
#用户卡的类型
|
|
#用户卡的类型
|
|
const UnknownCard = 0;
|
|
const UnknownCard = 0;
|
|
|
|
|
|
@@ -143,6 +145,7 @@ function card_type($cardno)
|
|
$ret = $checker($cardno);
|
|
$ret = $checker($cardno);
|
|
if (empty($ret))
|
|
if (empty($ret))
|
|
{
|
|
{
|
|
|
|
+ Log::record("淘宝接口没法使用了,用传统办法识别卡类型",Log::DEBUG);
|
|
if (preg_match('/^134[0-8]\d{7}$|^(?:13[5-9]|147|15[0-27-9]|17[28]|18[2-478]|19[578])\d{8}$/', $cardno, $matches)) {
|
|
if (preg_match('/^134[0-8]\d{7}$|^(?:13[5-9]|147|15[0-27-9]|17[28]|18[2-478]|19[578])\d{8}$/', $cardno, $matches)) {
|
|
return ChinaMobileCard;
|
|
return ChinaMobileCard;
|
|
} elseif (preg_match('/^(?:13[0-2]|145|15[56]|166|17[156]|18[56]|196)\d{8}$/', $cardno, $matches)) {
|
|
} elseif (preg_match('/^(?:13[0-2]|145|15[56]|166|17[156]|18[56]|196)\d{8}$/', $cardno, $matches)) {
|