Hello all,
How do I format the <DeviceInfo> element within an <EncryptedTrackData> element?
I'm trying to integrate an encrypted card reader from ID Tech with an iPhone application using AIM. I'm using the information found in http://www.authorize.net/support/AIM_guide_XML.pdf.
In appendix B it instructs to add an <EncryptedTrackData> element to the <payment> element, and shows an example. I have integrated the example into my code, and I'm getting the following error :
E00061 Device information is not formatted correctly(1).
The device information element <DeviceInfo> in the example contains the following, Hex encoded:
FID=IDTECH.UniMag.Android.Sdk?v1^SomeTBDKey1=someothervalu
At best that looks incomplete. I've tried many different variations on that format and can't get past it. Do I need to have a specific FID? If I take the FID portion out, it complains of a missing FID value, so I think I'm on the right track, but cannot find any documentation on how to format the DeviceInfo section.
Here is my request:
<?xml version="1.0" encoding="utf-8"?>
<createTransactionRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<sessionToken>DbXl3bX4jhhnn3o44EFePBJ1S_qG6sn3wh0n$yenCMWQTTDSabyzGeggUWFm9jXW$EViMAdMTv8KXGgl0OX0DnVifttUFmUXVbHw4V_pGPYzAUaGLq5eKqB1YLwo$SM8xvAjRW6MbYMXju98zTxwqAAA</sessionToken>
<mobileDeviceId>641D3C27_88A4_4842_A1BC_7E0765CAA0E9</mobileDeviceId>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<payment>
<encryptedTrackData>
<FormOfPayment>
<Value>
<Encoding>Hex</Encoding>
<EncryptionAlgorithm>TDES</EncryptionAlgorithm>
<Scheme>
<DUKPT>
<Operation>DECRYPT</Operation>
<Mode>
<Data>1</Data>
</Mode>
<DeviceInfo>
<Description>4649443D4944544543482E556E694D61672E416E64726F69642E53646B76315e536f6d655442444b6579313d736f6d656f7468657276616c756</Description>
</DeviceInfo>
<EncryptedData>
<Value>02f700801f4824008383252a353434392a2a2a2a2a2a2a2a333336345e43414c4457454c4c2f48454154484552202020202020202020205e313230372a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a3f2a3b353434392a2a2a2a2a2a2a2a333336343d313230372a2a2a2a2a2a2a2a2a2a2a2a3f2a027eada5988a4718602b6d9df5942be84a197f9b1eba2f6b2abd139f7da070678267cf8254ec1d32c74733e6eb665b21ad52d29f24f8c2068c12f4f07e429a1591308158a909f5028c62d4da048fe77d9ff2b81e6a2cc01c1c626d7bbc5a0bfb85739b5a8ad097f76fef5cbf2b9bf8515431333431323032333376379501000140e0002c8f1503</Value>
</EncryptedData>
</DUKPT>
</Scheme>
</Value>
</FormOfPayment>
</encryptedTrackData>
</payment>
<order/>
<lineItems/>
<customer/>
<billTo/>
<shipTo/>
<transactionSettings/>
<userFields/>
</transactionRequest>
</createTransactionRequest>
And here's the response I'm getting:
<?xml version="1.0" encoding="utf-8"?>
<createTransactionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Error</resultCode>
<message>
<code>E00061</code>
<text>Device information is not formatted correctly(1).</text>
</message>
</messages>
<sessionToken>yOetHv0orjnUdVosJNP4X$lB5RGsPmCtGrL0hdcrg3arjzaCojNW8zCkUl0BT2N9Bwo50DTtA3Oi3zMXgRaZGTG6MJZwB9M15K5sv$mrv5wllbSgcUJ3Mq66wk6YuNxywgqC8Pi0aiaGqOEqKfpZqwAA</sessionToken>
</createTransactionResponse>
Thanks for your help!
-Dustin
Solved! Go to Solution.
03-18-2014 08:54 PM - last edited on 03-19-2014 09:29 AM by RichardH
My apologies, I realize we're talking about different things. Please disregard my previous reply.
Let's back up a bit. Which make and model of card reader are you using? And where did you acquire it?
With that information I can provide a better answer.
07-08-2015 02:41 PM
It's an IDTECH SecureMag USB KB reader - it spits out the encrypted data like a keyboard would.
The data contains unencrypted information like the last 4 digits of the card of the card holder's name.
I also don't know which parts of that information needs to be submitted to authorize.net - once I know that, I can hopefully find out how to extract it from the code. I have the source code of a program that does it - I just don't know what exactly is required.
But before I can get there, I still have the E00061 error to contend with - unless that error shows up because the data cannot be decrypted correctly in which case the error message is misleading.
07-08-2015 02:45 PM
@rlund Where did you buy the card reader?
07-09-2015 08:18 AM
I don't know that answer - I'm just the developer who is supposed to make it work.
As far as I know, one of our business partners who uses a different card reader from the same company organized the whole thing. As far as I know, the card readers were pre-programmed with the correct settings and key to work with authorize.net.
07-09-2015 08:22 AM
Still hoping on an answer here since I can't even test any data submissions until I know what Device Information should be sent to avoid this error...
Can I get a final ruling on whether or not the Device Info is the same for every reader (as referenced earlier in this thread) or if a key has to be attached?
If I need to attach a key to the Device Info, which key is that? The KSN, the Input Derivation Key, or ... ?
The Demo software for this reader outputs a some kind of key in Hex, but doesn't say what key that is.
07-14-2015 08:50 AM