PHP code example of stgit90 / detect-valid-card
1. Go to this page and download the library: Download stgit90/detect-valid-card 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/ */
stgit90 / detect-valid-card example snippets
use CardValidDetect\ValidDetect;
$detector = new ValidDetect();
$card = '4916847576752405';
if($detector->detect('4916847576752405')->isValid()){
echo $detector->getType() //Visa
}