Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 699 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 699 Bytes

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