The Luhn algorithm is the first line of defense in many e-commerce sites and is used to validate a variety of identification numbers such as credit card numbers. Nevertheless, many card numbers exist and at such volumes, the algorithm cannot distinguish among these numbers. A variety of tests show that the Luhn algorithm suffers from weaknesses including the failure to determine the length and type of credit card number being analyzed. The authors intend to enhance the Luhn algorithm for the validation of credit card numbers. The enhancement is expected to be useful for many e-commerce sites that use the algorithm.