gatepay / credit-card
A credit card validator and generator for PHP
1.0.0
2026-04-03 15:37 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- slevomat/coding-standard: ^8.28.1
- squizlabs/php_codesniffer: ^4.0.1
README
Zero Dependency Credit Card (And Debit Card) Checker, based on Luhn Algorithm.
Installation
composer require "gatepay/credit-card"
Usage
For implementation please refer HOW TO guide.
Requirements
php 8.1 or higher is required to use this library.
Credit / Debit Card Brands
The brand source IIN (Issuer Identification Number) data is based on Wikipedia IIN.
By default, supported brands (factories) are:
- American Express
- BankCard
- Borica
- China T-Union
- Dankort
- Diners Club
- Diners Club International
- Discover Card
- Elo
- Humo
- HiperCard
- InterPayment
- JCB
- LankaPay
- Laser
- Maestro
- Maestro UK
- Mastercard
- Mir
- RuPay
- Solo
- Switch Debit
- Troy
- UnionPay
- UzCard
- Verve
- Visa
- Visa Electron
- GPN (Recommended to disable this brand, as it is widely overlapping with other brands, and it is not widely used - disabled by default)
License
MIT License - Use it, modify it, ship it.
Stop fighting your payment gateway. Start shipping features.
Built with ❤️ for developers who have better things to do than debug payment integrations.