Skip to content

arabhossain/php-cards-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect Debit Credit Card Types with logo

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();