Hi All,
We're consistantly getting error code 13 on the live server (sandbox works perfectly)
we've confirmed the live login ID, both online and through the support line.
The XML we're sending to the Live server is identical (aside from login id and trans action key)
to what we're sending to the sandbox but stil get error 13
Server:https://secure.authorize.net/gateway/transact.dll
XML (stars on confidential information)
<?xml version="1.0" encoding="utf-8"?>
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>********</name>
<transactionKey>****************</transactionKey>
</merchantAuthentication>
<refId>50</refId>
<subscription>
<name>Subscription</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>2012-01-26</startDate>
<totalOccurrences>9999</totalOccurrences>
</paymentSchedule>
<amount>27</amount>
<payment>
<creditCard>
<cardNumber>************</cardNumber>
<expirationDate>****</expirationDate>
</creditCard>
</payment>
<billTo>
<firstName>******</firstName>
<lastName>******</lastName>
</billTo>
</subscription>
</ARBCreateSubscriptionRequest>
Any help would be greatly appreciated
Thanks
James
Solved! Go to Solution.
12-27-2011 08:23 AM
Hi All,
I've run in it's very simplest form (manually creating and confirming the XML) and posting to the server. Exactly the same issue.
Thanks
James
12-27-2011 05:59 PM
Can you post the code in its entirety, with stars for the login ID and transaction key, here so we can try it ourselves? Please use the tools so the code is formatted and easier for us to read.
12-27-2011 06:02 PM
function sendRequest($mode,$request,$server) { $request = "<?xml version=\"1.0\" encoding=\"utf-8\"?> <ARBCreateSubscriptionRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"> <merchantAuthentication> <name>********</name> <transactionKey>****************</transactionKey> </merchantAuthentication> <refId>53</refId> <subscription> <name>Subscription</name> <paymentSchedule> <interval> <length>1</length> <unit>months</unit> </interval> <startDate>2012-01-27</startDate> <totalOccurrences>9999</totalOccurrences> </paymentSchedule> <amount>27</amount> <payment> <creditCard> <cardNumber>****************</cardNumber> <expirationDate>**/****</expirationDate> </creditCard> </payment> <billTo> <firstName>******</firstName> <lastName>****</lastName> </billTo> </subscription> </ARBCreateSubscriptionRequest>"; file_put_contents("files/tmp/request-".mktime(),$request); $ch = curl_init("https://secure.authorize.net/gateway/transact.dll"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml")); curl_setopt($ch,CURLOPT_POSTFIELDS,$request); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); $response = curl_exec($ch); //$returnArray = $this->responseToArray($response); curl_close($ch); file_put_contents("files/tmp/response-".mktime(),$response); return explode($this->delimChar,$response); }
12-27-2011 07:17 PM
Incidently, why use XML posts rather than the API? This looks like PHP, and the PHP API works pretty well from what I've seen.
12-27-2011 08:34 PM
Simple loginID and transactionKey test on your browser. Right click to copy the link location. Change YourLoginID and YourTransKey.
Should get
3,1,8,The credit card has expired........
because of the expiredate.
12-28-2011 04:25 AM - edited 12-28-2011 04:27 AM
Thank you,
I've tried that and it works which raises more questions the same values were used in our XML (where the *s currently are)
and again - it works perfectly in sandbox but not on the live server.
I really hope someone can shed some light on this, is the XML above wrong? if it is why does it work on Sandbox and not live?
12-28-2011 01:37 PM
Wait a second. Error code 13 says the login is invalid OR THE ACCOUNT IS INACTIVE. Have you checked to see if your account is active?
12-28-2011 01:44 PM
Hi,
Sure have and definately is, i don't think RaynorC1emen7's suggestion would have worked either if it weren't
We spent about 30 minutes on the phone to Auth.net who said they couldn't validate / invalidate our XML and we should do so on the forums, i'm hoping someone can see what the issue is with what we're sending to the server.
Perhaps someone could try our XML with their login and transaction ID?
Thanks
James
12-28-2011 01:48 PM
The XML itself look ok and it work on the test server. The only thing I could think of is to set curl_setopt the Content-length with the xml length. It might be sending it as 0 for some reason.
12-28-2011 02:09 PM
just tried setting the Length, also no good same response
12-28-2011 03:17 PM