batmage/credit-card-validator

A simple credit card validator using the Luhn algorithm

1.0.0 2016-07-25 22:32 UTC

This package is not auto-updated.

Last update: 2024-09-26 03:14:16 UTC


README

A simple PHP module to validate credit card numbers using the Luhn algorithm (by default).

Build Status Latest Stable Version License

Installation

Require in your project with composer:

composer require batmage/credit-card-validator ^1.0

Usage

An example use:

$validator = new \Batmage\CreditCardValidator\Validator;
$result = $validator->validate('4111 1111 1111 1111'); // bool(true)

License

MIT license. See LICENSE.md for more information.