node-card-capture
Version:
launches a child process in python to read from the magtek reader directly and returns the raw track data
12 lines (9 loc) • 384 B
JavaScript
var cardCapture = require('./node-card-capture').cardCapture
var cardCaptureSync = require('./node-card-capture').cardCaptureSync
// Synchronous call aka Stops everything until it's done
var trackdata = cardCaptureSync()
console.log(trackdata)
// Asynchronous call aka will return when done and is non blocking
cardCapture(function(trackdata){
console.log(trackdata)
})