Registry / utility / inacho-php-credit-card-validator

inacho-php-credit-card-validator

JSON →
library1.0.2phppackagistunverified

Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date

composer require inacho/php-credit-card-validator
INSTALL
IMPORT
SIG · INACHO-PHP-CREDIT-
I
inacho-php-credit-card-validator
utilityphpv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CreditCard
use Inacho\CreditCard\CreditCard;

Validate a credit card number

use Inacho\CreditCard\CreditCard; $card = CreditCard::validCreditCard('4111111111111111'); if ($card['valid']) { echo 'Card is valid'; }
Debug
Known issues
gotchaDoes not validate against actual issuer databases, only format and Luhn
fix
Use additional services for real-time validation
affects: *
Upgrade
Version history
1.0.2latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
18
Resources
inacho-php-credit-card-validator — pip install inacho-php-credit-card-validator · libregistry