My boss’s boss was informed that the credit card laws were changing and therefore, we needed to deploy new credit card readers and change our program to interface with the new readers.
I had already gotten started with development and was interfacing with the iSC480 very well (see previous article for more details). My one remaining task was to detect when a user was trying to “swipe” an EMV card. The EMV card must be inserted and not swiped.
The documentation said several times, “If the swiped card is an EMV card then the cardholder will be prompted to insert the card” (Dev Guide, sec 3_6_18, variable 413). Well, that never happened. So I had to write that code myself.
It was pretty easy. I just had to determine if a card is an EMV card. Track 2 contains a service code (positions 21-24). If position 21 contains a “2” or “6”, then the card is an EMV card and must be inserted. I detected it and changed the screen message and I was back on track again. No biggie.
When I inserted a EMV card, nothing happened. The vendor said that the device should start automatically running through screens. I never saw any of that. Finally, my team had a phone conference with a tech guy from the vendor. He pointed out a few VERY important pieces that were necessary to process EMV transactions:
1. EMV must be turned on in the device. By default, it is NOT turned on. So, you will never get anywhere until you know this critical step. To turn on EMV in the device, you need to send a “M60” command to change setting “19” to a “1” instead of the default of “0”. The support guy was surprised that I hadn’t read that tidbit because it was “easy to find” somewhere in the 826-page-long PDF document (Dev Guide). I eventually found it under the section titled “Support for Voice Referral for EMV”. I guess they figured the whole “voice referral” part would not dissuade me. They were mistaken.
2. Once the user inserts the card, a 09 command is received (via the API). At this point, you (the programmer) needs to send the following:
– M14 (use transaction type 01 = Sale)
– M13 (Set amount, without the decimal point)
– The device will respond with a 33.02 message
– M04 (set the transaction to “B” for credit or “A” for debit, etc)
– M13 (set the amount again, for some reason)
Then, the device will take-off and do all of the EMV magic. The user will have to do some actions on the screen. These actions will vary, based on the settings inside of the EMV chip in the card.
3. When the user completes all of the required input, the device will send a 33.03 message asking you (the programmer/program) to do a credit auth. You need to respond with a M22.04 message.
4. The device will ask the user to eject the card. The device might ask the user to sign.
5. When the user is done signing, the device will not give any indication that the user is done signing. That is of course, unless you already knew that you had to set variable “0009” to “1” and you have already done it, before you started any of this. If you already took care of this, the device will send a “20.0” message to indicate that the signature is done. Otherwise, you could always set up a polling loop (timer thread) to check if a signature message has been recently received.
So, as long as you know all of these little tricks, the EMV stuff is pretty easy to deal-with in the iSC480. Otherwise, the EMV stuff may not seem very intuitive and it will have you scratching your head for a while.
I was disappointed that, Goog/Bing didn’t have any info about it. I guess people aren’t supposed to talk about the SDK. I have been intentionally vague in this article, to avoid heat. So, if this article didn’t make any sense, it is probably because you don’t already have the SDK.
Final note: Snaps to the tech support at the vendor. I always hate calling for tech support. It feels the same as stopping at a gas station and asking for directions. *ugh*. However, in this case I wish I hadn’t burned two weeks before I called. The support folks at the vendor, got me back-on-track quickly. The phone call and solution took like, 5 minutes.
Hopefully, you found this guide on the web and it saved you a lot of headaches.