arabhossain/php-cards-detector

Any types of Debit or Credit card type detector

v1.1.4 2019-10-12 11:19 UTC

This package is auto-updated.

Last update: 2024-06-12 22:14:54 UTC


README

Utility to determine credit card type

Installation

composer require arabhossain/php-cards-detector

Supported Cards

Amex DinersClub Discover JCB Maestro MasterCard Visa

Usage

require "vendor/autoload.php";

echo \CardDetector\Detector::detect("5555555555554444")->get_name();
echo \CardDetector\Detector::detect("5555555555554444")->get_logo();
echo \CardDetector\Detector::detect("5555555555554444")->get_logo_base64();

Or you can simply use

use  \CardDetector\Detector as CardDetector;
echo CardDetector::detect(23232313131313)->get_name();