The CCVer script uses the Luhn Algorithm (also known as the "modulus 10" algorithm) to validate credit card numbers:
- Starting from the rightmost digit, double every second digit
- If the doubled digit is greater than 9, subtract 9
- Sum all the digits
- If the total is divisible by 10, the number is valid
Important: This only validates the number format. It does NOT verify that the card exists, has funds, or is authorized for use. Actual payment processing requires integration with a payment gateway.
The script also identifies the card type based on the prefix:
- Visa: Starts with 4
- MasterCard: Starts with 51-55
- American Express: Starts with 34 or 37
- Discover: Starts with 6011