Skip to content

Instantly share code, notes, and snippets.

@sangle1096
sangle1096 / usb-credit-card-reader.js
Created November 14, 2018 11:23 — 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