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.
Details
at line 40
static string
computeCheckDigit($partialNumber)
No description
at line 56
static bool
isValid(string $number)
Checks whether a number (partial number + check digit) is Luhn compliant
at line 68
static string
generateLuhnNumber(string $partialValue)
Generate a Luhn compliant number.