Reply
Member
Posts: 5
Registered: ‎01-17-2013
Accepted Solution

AIM XML E00002 Error troubleshooting

Here's the situation: 

 
I have a FileMaker Pro database solution that currently uses a payment gateway (not Authorize.net) to handle credit card transactions. The transactions are submitted using XML and a URL Post. I use the Troi URL plugin to do the POST because FileMaker does not have POST capability built in. There is no issue with this gateway, it's worked fine for years.

I am now trying to do the same thing with Authorize.net. Using the AIM XML guide, I have setup an XML "payload" to submit to the test URL. When I submit it I'm getting back the following Error message including the garbage characters at the beginning:

Ôªø<?xml version="1.0" encoding="utf-8"?><ErrorResponse 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>E00002</code><text>The content-type specified is not supported.</text></message></messages></ErrorResponse>

The Authorize.net description of this error is:

API Error Code: E00002
Error Code Text: The content-type specified is not supported.
Description: The only supported content-types are text/xml and application/xml.

My Troi URL plugin submission in FileMaker looks like this:

TURL_Post( ""; "https://apitest.authorize.net/xml/v1/request.api"; "xml=" & $XML_Payload )

The $XML_Payload is a simply a script variable that contains the sample XML code below. What I'm wondering is if Authorize.net expects some special string or code to say that this is "text/xml" coming in. Note that the string "xml=" precedes the XML code below when it gets submitted. This works fine with the existing gateway and seems to make no difference to Authorize.net whether it's there or not, it still produces the E00002 error.

<?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>
<name>111222333</name>
<transactionKey>1234123412341234</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>sale</TransactionType>
<amount>10</amount>
<payment>
<creditCard><cardNumber>4111111111111111</cardNumber>
<expirationDate>12/13</expirationDate>
<cardCode>123</cardCode></creditCard>
</payment>
\<customer><id>115</id><></></customer>
<billTo>
<firstName>Sally</firstName>
<lastName>Peterson</lastName>
<company></company>
<address>8 Steiger Road</address>
<city>Boston</city>
<state>MA</state>
<zip>02116</zip>
<country></country>
</billTo>
<customerIP></customerIP>
<transactionSettings>
<setting>
<settingName>allowPartialAuth</settingName>
<settingValue>false</settingValue>
</setting>
<setting><settingName>duplicateWindow</settingName>
<settingValue>0</settingValue>
</setting><setting><settingName>Customer</settingName><settingValue>false</settingValue>
</setting>
<setting><settingName>testRequest</settingName>
<settingValue>false</settingValue>
</setting>
</createTransactionRequest>

 


Accepted Solutions
Solution
Accepted by topic author wmloving
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: AIM XML E00002 Error troubleshooting

Is it from http://www.troi.com/software/urldetails.html ?

 

Look like they have a TURL_SetCustomHeader function. Might be something like or you might have to read the manual.

 

TURL_SetCustomHeader( "" ; "Content-Type: text/xml" )

View solution in original post


All Replies
Solution
Accepted by topic author wmloving
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: AIM XML E00002 Error troubleshooting

Is it from http://www.troi.com/software/urldetails.html ?

 

Look like they have a TURL_SetCustomHeader function. Might be something like or you might have to read the manual.

 

TURL_SetCustomHeader( "" ; "Content-Type: text/xml" )
Member
Posts: 5
Registered: ‎01-17-2013

Re: AIM XML E00002 Error troubleshooting

Yes. This is exactly the issue. Just needed to set a Custom Header declaring "Content-Type:text/xml" and it worked.

 

Thanks!