An open API service indexing awesome lists of open source software.

https://github.com/arabhossain/php-cards-detector

creditcarddetector
https://github.com/arabhossain/php-cards-detector

amex card detector dinersclub jcb maestro mastercard php visa

Last synced: 4 days ago
JSON representation

creditcarddetector

Awesome Lists containing this project

README

          

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