Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 556 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 556 Bytes

Luhn Algorithm Validator / Credit Card Type Checker

"Implement the Luhn algorithm to validate a credit card number. Bonus points if you can identify what brand of credit card the user inputted!"

via Cassidy William's Newsletter from August 6, 2023

Install Dependencies

composer install

Test Coverage

composer test

References:

Luhn Algorithm:
https://en.wikipedia.org/wiki/Luhn_algorithm

Regex for Checking Card Type: 
https://stackoverflow.com/questions/72768/how-do-you-detect-credit-card-type-based-on-number/72801#72801