?
Solved

Authorize.net XML Error E00002 - XML type not supported

Posted on 2013-01-17
1
Medium Priority
?
840 Views
Last Modified: 2013-01-18
Situation: I have a FileMaker solution that currently uses a payment gateway 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 this 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 their 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 script variable 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...

<?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>
0
Comment
Question by:Will Loving
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
Will Loving earned 0 total points
ID: 38794933
For anyone else who might be doing this, the answer was simply that I needed to include a "Custom Header" with my URL Post specifying the Content type as XML:

"Content-Type:text/xml"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Original post  on Monitis Blog. Web performance monitoring is broken into two camps: passive and active. Passive monitoring is defined as looking at real-world historical performance by monitoring actual log-ins, site hits, clicks, requests for …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question