Hacker News new | ask | show | jobs
by pmiller2 2199 days ago
The only two explanations I can think of are ignorance and laziness. Ignorance doesn't really fly, IMO, because when you have an input field, you should be at least thinking about validating said input. From there, the simplest of google searches will lead you to the checksum algorithm.

Laziness seems most likely for that reason, but, on top of that, it's not like you even have to go to Stack Overflow to find an implementation. Wikipedia has one! Wiki. Pedia.

Just take my input, run the checksum, check that my expiration date isn't in the past and that the CVV value is the correct number of digits, and just run the charge. It's not like if I mistype my MasterCard's first digit as a 4 that it's going to work anyway. Just do the checks that are feasible, and then just run the charge.