cancel
Showing results for 
Search instead for 
Did you mean: 

Getting E00061 - How do I format device information for encrypted mobile card reader track data?

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

dustin1024
Member
24 REPLIES 24

Hi,

 

I am working on integrating the encrypted card reader with ios. Can you please guide on how to generate the values for DeviceInfo and encrypted value? I have been scrambling for so many days without any luck and it is nothing in documentaiton about it.

 

Please help.

 

Regards,

Ritesh

Hello @riteshmitra 

 

The iOS SDK now resides on GitHub and that there is documentation on how to use it as part of the download. https://github.com/AuthorizeNet/sdk-mpos-ios

 

Are you using an encrypted reader injected with the Authorize.Net key?  For a list of supported secure card readers devices please go to http://www.authorize.net/mobile. 

 

Please note that  the sandbox and live production environments use a different key, and they cannot be used interchangeably.   You must use a reader injected with the sandbox key when testing in the sandbox, and a reader injected with the production key with the live payment gateway.

 

Richard 

 

Hi Richard,

 

I am using encrypted card reader using iOS SDK on production environment.

 

Hope this answers your questions.

 

Please guide on how to do this.

 

Regards,

Ritesh

Which encrypted card reader are you using?

 

Richard

IDTECH Shuttle

Hi.

 

Reviving an old thread because I can't find a solution for this anywhere.

 

I get the exact same error, even when I substitute the DeviceInfo/Description as suggested by Lilith.

 

I am using the reference page to test this so far: http://developer.authorize.net/api/reference/

 

Is it possible that running a transaction request on this page does not work with encrypted data, or am I missing anything?

 

Thanks!

 

rlund
Contributor

@rlund, are you using a card reader that has been injected with the key for our Sandbox environment?

If it's using the Production key, that would explain the error, as the API Reference Page plugs into the Sandbox environment.

--
"Move fast and break things," out. "Move carefully and fix what you break," in.

Thanks for the reply.

 

To be sure: are you saying that the error message not only shows up with the Device Information is incorrect but also if the decryption of the data fails?

 

As far as I know, the reader I have has a key built-in that works for the live environment, so I didn't expect the decryption to work, but I was confused on the error message talking about the Device Information being incorrect...

 

@rlund Bear in mind that the DeviceInfo element should include the key in its contents:

 

FID=IDTECH.UniMag.Android.Sdk?v1^SomeTBDKey1=someo​thervalu

 

Since the API Reference is meant to be used without needing a Production account, it uses the Sandbox environment, and needs the Sandbox key.

--
"Move fast and break things," out. "Move carefully and fix what you break," in.

Is this documented anywhere at all? I thought earlier in this thread it was announced that the hex string can be the same generic text for everyone ...

 

Also, how does this information get encrypted into the hex string that shows up in the documentation?

 

And isn't it counterproductive to security to include the key in the submitted code?

 

I was under the impression that the code needed to be kept as secret as possible - I don't even have the code that was used to setup the card reader I have, and I was told that I would not be given the code for security reasons...

 

I'm sorry, but now I'm utterly confused...