Archive for November 6th, 2008

You are browsing the archives of 2008 November 06.

Javascript to Parse Credit Card Track 1 and/ or 2 Magnetic Stripe Read

Your mileage will vary based on what your hardware is configured to return. The simplest way to test is to swipe into your favorite text editor.
My hardware returned a format like this for Track 1:
B9999999999999999^lastName/FirstName^yymm….
And like this for Track 2:
9999999999999999=yymm…
Where “…” is a bunch of stuff I didn’t care about for the purposes of this [...]