cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code 13 - Login ID Confirmed, Same integration works on Sandbox

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

cevo
Contributor
21 REPLIES 21

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

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.


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post
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);
		
	}

 

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.

Simple loginID and transactionKey test on your browser. Right click to copy the link location. Change YourLoginID and YourTransKey.

 

TestIDandKEY 

 

Should get

3,1,8,The credit card has expired........

because of the expiredate.

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?

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?

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

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.

just tried setting the Length, also no good same response