Luhn
class Luhn
Utility class for generating and validating Luhn numbers.
Luhn algorithm is used to validate credit card numbers, IMEI numbers, and National Provider Identifier numbers.
Methods
static
string
computeCheckDigit($partialNumber)
No description
static
bool
isValid(
string $number)
Checks whether a number (partial number + check digit) is Luhn compliant
static
string
generateLuhnNumber(
string $partialValue)
Generate a Luhn compliant number.