I mistyped a digit on my credit card last time I was shopping online and the site promptly told me the card number was invalid. But there’s no way it had time to check with the bank. Is there some secret coding system for credit card numbers that they used, and if so, how does it work?