The magnetic stripe on the back of the card contains the card number, the name on the account, and some additional data. It’s read by a read-head similar to the ones in cassette tape players. The device that scans the card can make a phone call or Internet connection to the card processor, who knows how to charge your account.
Before *that*, the store would use a machine that imprints the raised numbers from the card onto a paper slip; then collect and turn those paper slips in to the bank to get their money.
Latest Answers