This year, we wanted to do it much faster, so that people didn't have to stand around for 3 minutes. So I got a magstripe reader! The model I tried first was the MAGTEK Centurion Keyboard Encoder (PN-21073062).
The output is the error-corrected data right off the card, all three tracks, with the assumption that it's a proper credit card in the standard layout.
The data output is as follows, split up by track.
Track one is almost exclusively used for credit card data. Track 2 is used for pretty much anything including older ATM cards, other IDs, laundry, etc. Track 3 data tends to be used by driver licenses. Since I don't have such a license I can't demonstrate track 3.
Anyways, this is all very good and interesting, and I can get all the data I want this way. But what we really wanted was something to actually parse out the name, expiration and PAN (card number) from the data. There didn't seem to be any products that did this for us, so I built one instead!
What I wanted was to get that raw data before it got spit out the USB port. I opened up the Magtek and found that the whole thing is not easily hackable.
So instead I purchased a raw magstripe head from Mouser, remember that the data I want is on track 1 so I got the only head they had with track 1 reading, the Omron V3A-6 (Datasheet here). It can also read track 2.
All this great timing data is from a handy app note by magtek (which I strongly recommend to any magstripe enthusiasts!). The data is sampled on the falling edge and is in LSB order - somewhat opposite most SPI implementations.
The data isn't in any 'standard' ASCII representation, it's actually 6 bits per byte with a parity bit to make it 7 bits long. Each byte should be checked for parity and then can be convereted to ASCII by adding 0x20 hex. There is some fun detail in said app note about how to calculate parity bits or you can just read the code. Again, this is only for track 1, track 2 is slightly different.