AnsweredAssumed Answered

Sending XML using Insert from URL

Question asked by sethbburgess on Oct 26, 2018
Latest reply on Oct 30, 2018 by sethbburgess

I am struggling with the correct syntax to make an API call to authorize.net.  I am close to a solution, but I am getting this error back:

 

{"messages":{"resultCode":"Error","message":[{"code":"E00001","text":"Unexpected character encountered while parsing value: x. Path '', line 0, position 0."}]}}

 

I am using the following Insert from URL code to make the request (name and transaction key removed for security):

 

"httpspost://api.authorize.net/xml/v1/request.api" & "?xml=" & GetAsURLEncoded("<?xml version=\"1.0\" encoding=\"utf-8\"?>

<getTransactionDetailsRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">

<merchantAuthentication>

    <name>xxxxxxxxxxxxxx</name>

    <transactionKey>xxxxxxxxxxxxxxxxx</transactionKey>

  </merchantAuthentication>

  <transId>40926314752 </transId>

</getTransactionDetailsRequest>")

 

I am reasonably sure that the XML is correct, but somehow the overall syntax is flawed.  I am hoping that someone can see the flaw that I can't see.  Thanks.

Outcomes