Reply
New Member
Posts: 2
Registered: ‎05-19-2017

Switch from sandbox to production gets HTML 406 response

This is on an IBM i at v5r4 using RPGXML from Krengeltech and an RPGLE program.

 

It worked fine in the sandbox, but when we changed the URI to production and started using our production credentials, we get an HTTP 406 Not acceptable response.  Here's the log from RPGXML:

 

- - - - - - - - - - - - - - - - - - - - - - - C O N N E C T I O N   F E E D B A C K - - - - - - - - - - - - - - - - - - - - - - - - 
About to connect() to secure2.authorize.net port 443 (#0)
  Trying 23.209.62.245... connected
- - - - - - - - - - - - - - - - - - - - - - - -  R A W   R E Q U E S T   D A T A  - - - - - - - - - - - - - - - - - - - - - - - - - 
POST /xml/v1/request.api HTTP/1.0
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)                                                                                  
Host: secure2.authorize.net
Accept: */*
Content-Type: text/xml
Content-Length: 679

<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>***</name>
    <transactionKey>***</transactionKey>
  </merchantAuthentication>
  <refId>***</refId>
  <transactionRequest>
    <transactionType>authOnlyTransaction</transactionType>
    <amount>.01</amount>
    <profile>
      <customerProfileId>123400000000000</customerProfileId>
      <paymentProfile>
        <paymentProfileId>000012340000000</paymentProfileId>
      </paymentProfile>
    </profile>
    <order>
     <invoiceNumber>186230</invoiceNumber>
    </order>
  </transactionRequest>
</createTransactionRequest>
- - - - - - - - - - - - - - - - - - - - - - - - R A W   R E S P O N S E   D A T A - - - - - - - - - - - - - - - - - - - - - - - - - 
HTTP/1.0 200 OK
Content-Type: text/html
Last-Modified: Wed, 16 Nov 2016 06:17:44 GMT
Accept-Ranges: bytes
ETag: "0347c24d13fd21:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Content-Length: 568
Date: Fri, 19 May 2017 05:52:41 GMT
Connection: close

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Error</title>
<link href="https://account.authorize.net/ui/themes/anet.css" type="text/css" rel="stylesheet">
</head>
<body>

	<div style="padding: 10px;">
		<div id="PageHeader">
			<div id="Title">
				Error
			</div>
			<div class="Line">
				<hr/>
			</div>
		</div>
		<div>
			An unanticipated error occurred while processing this request. Please click your 
			browser’s Back button to return to the previous page. 
		</div>
	</div>
	

</body>
</html>
- - - - - - - - - - - - - - - - - - - - - - - C O N N E C T I O N   F E E D B A C K - - - - - - - - - - - - - - - - - - - - - - - - 
Closing connection #0

Any ideas welcome.

New Member
Posts: 2
Registered: ‎05-19-2017

Re: Switch from sandbox to production gets HTML 406 response

I forgot to mention that we solved the 406 response, which was caused by having

 

Accept: text/xml

that prevented my end from receiving the XML that authorize.net was sending. Once I changed it to

 

Accept: */*

we started getting the HTML which showed the "unanticpated error".