Skip to content

Instantly share code, notes, and snippets.

@nickolaso
nickolaso / usb-credit-card-reader.js
Created September 20, 2018 15:14 — forked from stracqan/usb-credit-card-reader.js
Very simple jQuery implementation that reads card data from a USB Magnetic Strip Credit Card Reader.
/**
*
* Simple jQuery Script to parse credit card data
* that was collected via a USB Magnetic Stripe
* Credit Card Reader.
*
* To get this to work, focus your cursor (either
* programmatically or via a click, it's your choice) on an input field #credit-card-number
* and then with the card reader plugged in, swipe
* the card and it will take over from there