PHPackages                             arrayiterator/credit-card - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. arrayiterator/credit-card

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

arrayiterator/credit-card
=========================

A credit card validator and generator for PHP

1.0.0(3mo ago)11↑2900%MITPHPPHP &gt;=8.1CI passing

Since Mar 30Pushed 2mo agoCompare

[ Source](https://github.com/ArrayIterator/credit-card)[ Packagist](https://packagist.org/packages/arrayiterator/credit-card)[ Docs](https://github.com/arrayiterator/credit-card)[ RSS](/packages/arrayiterator-credit-card/feed)WikiDiscussions main Synced 3mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

Credit Card Validator &amp; Generator
=====================================

[](#credit-card-validator--generator)

[![PHP CI](https://github.com/TrayDigita/GatePay-CreditCard/actions/workflows/ci.yaml/badge.svg)](https://github.com/TrayDigita/CreditCard/actions/workflows/ci.yaml)[![codecov](https://camo.githubusercontent.com/3494bb914efb276a30a1dafb828333586a4ae19beb825d9443d384d1b30d7713/68747470733a2f2f636f6465636f762e696f2f67682f547261794469676974612f476174655061792d437265646974436172642f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/TrayDigita/CreditCard)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/7663c9d53dc13cedaf0660a8745a7e77d2dd711257f36aa86ebce12a0600ef42/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c75652e737667)](https://php.net)

Zero Dependency Credit Card (And Debit Card) Checker, based on [Luhn Algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm).

Installation
------------

[](#installation)

```
composer require "gatepay/credit-card"
```

Usage
-----

[](#usage)

For implementation please refer [HOW TO](HOWTO.md) guide.

Requirements
------------

[](#requirements)

`php 8.1` or higher is required to use this library.

Credit / Debit Card Brands
--------------------------

[](#credit--debit-card-brands)

The brand source IIN (Issuer Identification Number) data is based on [Wikipedia IIN](https://en.wikipedia.org/wiki/Payment_card_number#Issuer_identification_number_(IIN)).

By default, supported brands (factories) are:

- [American Express](src/Brands/AmericanExpress.php)
- [BankCard](src/Brands/BankCard.php)
- [Borica](src/Brands/Borica.php)
- [China T-Union](src/Brands/ChinaTUnion.php)
- [Dankort](src/Brands/Dankort.php)
- [Diners Club](src/Brands/DinersClub.php)
- [Diners Club International](src/Brands/DinersClubInternational.php)
- [Discover Card](src/Brands/DiscoverCard.php)
- [Elo](src/Brands/Elo.php)
- [Humo](src/Brands/Humo.php)
- [HiperCard](src/Brands/HiperCard.php)
- [InterPayment](src/Brands/InterPayment.php)
- [JCB](src/Brands/JCB.php)
- [LankaPay](src/Brands/LankaPay.php)
- [Laser](src/Brands/Laser.php)
- [Maestro](src/Brands/Maestro.php)
- [Maestro UK](src/Brands/MaestroUK.php)
- [Mastercard](src/Brands/Mastercard.php)
- [Mir](src/Brands/Mir.php)
- [RuPay](src/Brands/RuPay.php)
- [Solo](src/Brands/Solo.php)
- [Switch Debit](src/Brands/SwitchDebit.php)
- [Troy](src/Brands/Troy.php)
- [UnionPay](src/Brands/UnionPay.php)
- [UzCard](src/Brands/UzCard.php)
- [Verve](src/Brands/Verve.php)
- [Visa](src/Brands/Visa.php)
- [Visa Electron](src/Brands/VisaElectron.php)
- [GPN](src/Brands/GPN.php) (Recommended to disable this brand, as it is widely overlapping with other brands, and it is not widely used - disabled by default)

License
-------

[](#license)

[MIT License](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.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance84

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37867551?v=4)[ArrayIterator](/maintainers/ArrayIterator)[@ArrayIterator](https://github.com/ArrayIterator)

---

Top Contributors

[![ArrayIterator](https://avatars.githubusercontent.com/u/37867551?v=4)](https://github.com/ArrayIterator "ArrayIterator (4 commits)")

---

Tags

credit-carddebit-cardluhn-algorithmphpvalidatorgeneratorcredit-cardluhn-algorithm

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arrayiterator-credit-card/health.svg)

```
[![Health](https://phpackages.com/badges/arrayiterator-credit-card/health.svg)](https://phpackages.com/packages/arrayiterator-credit-card)
```

###  Alternatives

[dragon-code/card-number

Generation and verification of card numbers using Luhn's algorithm.

6613.6k](/packages/dragon-code-card-number)[schnittstabil/csrf-tokenservice

Stateless CSRF (Cross-Site Request Forgery) token service.

15161.2k2](/packages/schnittstabil-csrf-tokenservice)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
