cancel
Showing results for 
Search instead for 
Did you mean: 

AIM XML CP testing "The Market Type is invalid"

Greetings,

  I am working on making the transition from NVP submissions to the new AIM XML submissions.

  I began working with a new sandbox account as its my understanding that all sandbox accounts now have the ability to test both CNP and CP transactions - which is what m real retailer will have.

 My initial tests sending a string which includes track data is consistently returning error code "The Market Type is invalid".

 I can not find any settings within the sandbox merchant account to enable a CP AIM string with track data.

 

 Possible error points - does my track data string need editing so that the test card numbers are used?

 Or is the track data in some way rejected?  

 I've tried removing the first/last characters from the track data and see no change in the error code.

 

  Thanks for any additional ideas.

1 ACCEPTED SOLUTION

Accepted Solutions

http://developer.authorize.net/api/reference/

For Card Present, you need to pass these too

retailThe retail element contains two elements: marketType and deviceType. 
marketType0 for ecommerce 1 for moto 2 for retailDefault value is 2.
deviceType7 for mobile POS

http://www.authorize.net/support/AIM_guide.pdf

Page19

View solution in original post

7 REPLIES 7

Hello @LisaDMendez0426 

 

It will be easier to diagnose if you include your entire request and response with any sensitive information redacted.

 

Richard

RichardH
Administrator Administrator
Administrator

Thank you for your reply - I apologize for the delay I was looking at wrong place for notification.

 

This is the edited string I'm testing with.  All CR LF are entered for readability here only.  

These numbers are not valid.  

I am using the TEST API post URL

 

<?xml version="1.0" encoding="utf-8"?>
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name> sandbox Name </name>
<transactionKey>sandbox Key </transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>20.00</amount>
<payment>
<trackData>
<track1>%B4444111101782707^SMITH/JOHN E^1607101000000000000000155000000?;4444111101782707=16071010155000000000?
</track1>
</trackData>
</payment>
</transactionRequest>
</createTransactionRequest>

http://developer.authorize.net/api/reference/

For Card Present, you need to pass these too

retailThe retail element contains two elements: marketType and deviceType. 
marketType0 for ecommerce 1 for moto 2 for retailDefault value is 2.
deviceType7 for mobile POS

http://www.authorize.net/support/AIM_guide.pdf

Page19

Thank you!  You've moved me on from that error to a new one.  Now to investigate that one.

Much appreciated.

Lisa

Request#
URL : https://apitest.authorize.net/xml/v1/request.api
Headers : {
"Content-Type" = "text/xml";
}
Request Method : POST
Post body : <createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>5mU4gM5X8mS</name><transactionKey>3n5k72e5JgRK376r</transactionKey></merchantAuthentication><transactionRequest><transactionType>authCaptureTransaction</transactionType><amount>5</amount><payment><trackData><track1>#######</track1></trackData></payment><order><invoiceNumber>INV-12345</invoiceNumber></order></transactionRequest></createTransactionRequest>

 

############RESPONSE####################

Response#
<?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>E00027</code><text>The transaction was unsuccessful.</text></message></messages><transactionResponse><responseCode>3</responseCode><authCode>000000</authCode><avsResultCode>P</avsResultCode><cvvResultCode /><cavvResultCode /><transId>0</transId><refTransID /><transHash>AF7832C704BE737706274D1C99CC0ABF</transHash><testRequest>1</testRequest><accountNumber /><accountType /><errors><error><errorCode>85</errorCode><errorText>The market type is invalid</errorText></error></errors><transHashSha2 /></transactionResponse></createTransactionResponse>

Request#
URL : https://apitest.authorize.net/xml/v1/request.api
Headers : {
"Content-Type" = "text/xml";
}
Request Method : POST
Post body : <createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>5mU4gM5X8mS</name><transactionKey>3n5k72e5JgRK376r</transactionKey></merchantAuthentication><transactionRequest><transactionType>authCaptureTransaction</transactionType><amount>5</amount><payment><trackData><track1>%B4629860005000005^PANKAJ SINGH ^16080000000000000000000?</track1></trackData></payment><order><invoiceNumber>INV-12345</invoiceNumber></order><retail><marketType>2</marketType></retail></transactionRequest></createTransactionRequest>

 

############Response Success#########

 

Response#
<?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>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><transactionResponse><responseCode>1</responseCode><authCode>000000</authCode><avsResultCode>P</avsResultCode><cvvResultCode /><transId>0</transId><refTransID /><transHash>AF7832C704BE737706274D1C99CC0ABF</transHash><testRequest>1</testRequest><accountNumber>XXXX0005</accountNumber><entryMode>Keyed</entryMode><accountType>Visa</accountType><messages><message><code>1</code><description>This transaction has been approved.</description></message></messages><transHashSha2 /></transactionResponse></createTransactionResponse>

 

Being a new bee with usage of Authorize.net API, its support helped me to attain success

Hello @DanishJamia

 

The transaction id response of zero indicates you have your sandbox in test mode. Instead you should run the sandbox in live mode.

 

<transId>0</transId>

Richard