Will Loving
asked on
Authorize.net XML Error E00002 - XML type not supported
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:
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...
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"?><ErrorRe sponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/sche ma/AnetApi Schema.xsd "><message s><resultC ode>Error< /resultCod e><message ><code>E00 002</code> <text>The content-type specified is not supported.</text></message ></message s></ErrorR esponse>
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.
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/sche ma/AnetApi Schema.xsd ">
<merchantAuthentication>
<name>111222333</name>
<transactionKey>1234123412 341234</tr ansactionK ey>
</merchantAuthentication>
<transactionRequest>
<transactionType>sale</Tra nsactionTy pe>
<amount>10</amount>
<payment>
<creditCard><cardNumber>41 1111111111 1111</card Number>
<expirationDate>12/13</exp irationDat e>
<cardCode>123</cardCode></ creditCard >
</payment>
\<customer><id>115</id><>< /></custom er>
<billTo>
<firstName>Sally</firstNam e>
<lastName>Peterson</lastNa me>
<company></company>
<address>8 Steiger Road</address>
<city>Boston</city>
<state>MA</state>
<zip>02116</zip>
<country></country>
</billTo>
<customerIP></customerIP>
<transactionSettings>
<setting>
<settingName>allowPartialA uth</setti ngName>
<settingValue>false</setti ngValue>
</setting>
<setting><settingName>dupl icateWindo w</setting Name>
<settingValue>0</settingVa lue>
</setting><setting><settin gName>Cust omer</sett ingName><s ettingValu e>false</s ettingValu e>
</setting>
<setting><settingName>test Request</s ettingName >
<settingValue>false</setti ngValue>
</setting>
</createTransactionRequest >
<createTransactionRequest
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="AnetApi/xml/v1/sche
<merchantAuthentication>
<name>111222333</name>
<transactionKey>1234123412
</merchantAuthentication>
<transactionRequest>
<transactionType>sale</Tra
<amount>10</amount>
<payment>
<creditCard><cardNumber>41
<expirationDate>12/13</exp
<cardCode>123</cardCode></
</payment>
\<customer><id>115</id><><
<billTo>
<firstName>Sally</firstNam
<lastName>Peterson</lastNa
<company></company>
<address>8 Steiger Road</address>
<city>Boston</city>
<state>MA</state>
<zip>02116</zip>
<country></country>
</billTo>
<customerIP></customerIP>
<transactionSettings>
<setting>
<settingName>allowPartialA
<settingValue>false</setti
</setting>
<setting><settingName>dupl
<settingValue>0</settingVa
</setting><setting><settin
</setting>
<setting><settingName>test
<settingValue>false</setti
</setting>
</createTransactionRequest
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.