Michael McCauley Michael McCauley - 2 months ago 17
C# Question

Read Credit Card With EMV Chip and Write Data Into Web Browser-Based POS Screen

I'm trying to setup a POS screen in a web-based accounting system wherein staff can read either a standard magnetic strip credit card or one with an EMV chip. From what I've seen, none of the card readers capable of reading chip have keyboard emulation. So the issue is being able to read the card data and enter it into fields on a web browser form that is already open to the user.

I'm planning to focus on a particular USB reader that has C# .NET and Java SDKs available (also C++, but I am not practiced in developing in that language), but if I have to look elsewhere, I have to look elsewhere. So, utilizing either of those platforms, is there a way to read the data through a .NET or Java device listener and then be able to focus on a field or fields in an already open browser window to enter card data?

Or, is there anything available in a specific browser I can work with and force users into using that browser? I thought about possibly working with ActiveX, but I am under the impression that it is being phased out. What I have found so far doesn't help me with writing to an already open browser window, just with opening a new browser window altogether. Also, based on the nature of the accounting system, I am unable to implement any kind of ASP.NET or Java web app to handle operating the card reader. It only allows JavaScript customization, which I am pretty is unable to access output from a USB device connected to a PC.

Ive Ive

I think you're looking for a so-called 'keyboard wedge'. I haven't heard of anything out-of-the-box like that for chip readers.

However if all you need is to read the card-number (and not perform full EMV), then you could create one yourself fairly easily. Are you able to create a standalone application (perhaps written in c++) that runs all the time, and can act as the device 'listener'? I.e using your choice of SDK, wait for card-events and, invoke the command(s) to read the necessary EMV tag (5A?)

You then trigger the keyboard event for each digit in the card number (as explained here), followed by a [enter] event. With a text-input within your browser having focus, that could effect a simple form submission with the card number.