Ok, so after much debugging I finally had everything working, and then it just stopped. I sware I had the sample from here: http://community.developer.authorize.net/t5/News-and-Announcements/New-XML-API-for-Transaction-Proce... working and responding with "Invalid account", then I changed it to my account and got "invaild CC experation" through MY program.
Then, to save time, I used a 3rd party program (XML Transmitter) to continue tests in forming my XML. Once it got it trimmed down, I put the XML (which works fine using XML Transmitter) in to my program, but now, even if I put it back to how it was before, all my program ever returns is:
...
<code>E00003</code>
<text>'%' is an unexpected token. The expected token is '?gt;'. Line 1, position 20.</text>
...
I have no % anywhere in my XML, however I assume this is an encoding issue as I know Delphi uses %num fro caracters sometimes (%20 is Space), and gt; is a >. Here is exactly what I am sending:
XML2Send.Add('<?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>myName123</name>' +
'<transactionKey>MyKey1234567890t</transactionKey>' +
'</merchantAuthentication>' +
'<transactionRequest>' +
'<transactionType>authCaptureTransaction</transactionType>' +
'<amount>365.51</amount>' +
'<payment>' +
'<creditCard>' +
'<cardNumber>5424000000000015</cardNumber>' +
'<expirationDate>1112</expirationDate>' +
'</creditCard>' +
'</payment>' +
'</transactionRequest>' +
'</createTransactionRequest>');
I am so mad it was working fine and then just stopped (?!?!?). Does anyone know how to get it working again?
FYI: XML2Send is a TStringList, but it only works if the entire XML is in the 1st string (so it is a list of one string). I am using Indy TIdHttp to send with the following command:
XMLResponse := AuthNetHTTP.Post('https://api.authorize.net/xml/v1/request.api', XML2Send);