Retrieving the Data
On the ClaimedMagneticStripeReader class, there is no general-purpose DataReceived event. You must instead choose the one(s) you support by handling either BankCardDataReceived, AamvaCardDataReceived, or VendorSpecificDataReceived.
Each type of event handler is passed a distinct XXXEventArgs object. However, they all expose a Report object of type MagneticStripeReaderReport. This exposes the main data, as well as authentication data, additional security information, and a dictionary of string properties, if applicable. Unlike with a barcode reader, the data from a magnetic stripe comes in the form of four tracks. These are exposed as Track1, Track2, Track3, and Track4 properties of type MagneticStripeReaderTrackData. This ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access