PHP code example of annaghd / php-credit-card-validator-plus

1. Go to this page and download the library: Download annaghd/php-credit-card-validator-plus library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

annaghd / php-credit-card-validator-plus example snippets


'aliases' => array(

    'App'             => 'Illuminate\Support\Facades\App',
    ...
    'View'            => 'Illuminate\Support\Facades\View',

    'CreditCard'      => 'Inacho\CreditCard',

),

$card = CreditCard::validCreditCard('5500005555555559', 'mastercard');
print_r($card);

$card = CreditCard::validCreditCard('371449635398431');
print_r($card);

$validCvc = CreditCard::validCvc('234', 'visa');
var_dump($validCvc);

$validMonth = CreditCard::validMonth('07'); // past date
var_dump($validMonth);

$validYear = CreditCard::validYear('2007'); // past date
var_dump($validYear);
json
""annaghd/php-credit-card-validator-plus": "1.*"
},