From a4381ce9b4c381eb24dcdb809f1aa9ac4fdbc1e1 Mon Sep 17 00:00:00 2001 From: humancopy Date: Mon, 18 Jan 2016 20:27:25 +0100 Subject: [PATCH] Use is_numeric instead of ctype_digit to validate numeric type --- src/CreditCard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CreditCard.php b/src/CreditCard.php index ce8f5d6..1994088 100644 --- a/src/CreditCard.php +++ b/src/CreditCard.php @@ -124,7 +124,7 @@ public static function validCreditCard($number, $type = null) public static function validCvc($cvc, $type) { - return (ctype_digit($cvc) && array_key_exists($type, self::$cards) && self::validCvcLength($cvc, $type)); + return (is_numeric($cvc) && array_key_exists($type, self::$cards) && self::validCvcLength($cvc, $type)); } public static function validDate($year, $month)