inacho / php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date.
MIT License
199 stars 104 forks source link

Uncaught Error: Class #13

Open emresaracoglu opened 6 years ago

emresaracoglu commented 6 years ago

Hello,

I can getting this error:

Fatal error: Uncaught Error: Class 'CreditCard' not found in ..

I added with Composer but how I can Import your class in php file?

prezine commented 6 years ago

What have you done to on your end? How did you try implementing script?

emresaracoglu commented 6 years ago
$card = new \Inacho\CreditCard;

$card = CreditCard::validCreditCard('5500005555555559', 'mastercard');
print_r($card);
ltrtuan commented 6 years ago

You can try $card = \Inacho\CreditCard::validCreditCard('5500005555555559');