Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

authorize.net ARB api connection problems

New Here ,
May 03, 2007 May 03, 2007
Has anyone been able to use authorize.net's ARB api successfully? If so, was there anything special you had to do?

I was able to post to their testing URL, and receive a well formed XML response, but once I switched over to their production URL I receive and http authentication error. Nothing changed with my posting code, aside from the URL i am posting to. After doing some research and finding mention of occasional problems regarding CFHTTP and certain SSL certificates, I manually imported the SSL certificate as well, but the error continues....

Anyhow, if anyone has done this successfully, or has some feedback let me know. i can post my code as well as my error...

thanks.

TOPICS
Advanced techniques
707
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 03, 2007 May 03, 2007
There are 2 custom headers you have to pass when using CFHTTP via SSL. I'll see if I can dig them up
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 03, 2007 May 03, 2007
If you have already added their certificate to your java cert store on your server, try adding the following to your cfhttp call:

<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2007 May 03, 2007
thanks for the suggestion.

still no luck though. i added the headers to my post, and the error persists.

maybe it's something really stupid that i'm missing. i've messed around with the code enough at this point i would not be shocked. fresh eyes never hurt. with that in mind, here is my code and error (see below):
-----------
<cfoutput>
<CFXML VARIABLE="myXml">
<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>myusername</name>
<transactionKey>mytrankey</transactionKey>
</merchantAuthentication>
<refId>testing123</refId>
<subscription>
<name>Sample subscription</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>2007-05-25</startDate>
<totalOccurrences>12</totalOccurrences>
<trialOccurrences>1</trialOccurrences>
</paymentSchedule>
<amount>10.29</amount>
<trialAmount>0.00</trialAmount>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2008-08</expirationDate>
</creditCard>
</payment>
<billTo>
<firstName>test</firstName>
<lastName>test</lastName>
</billTo>
</subscription>
</ARBCreateSubscriptionRequest>
</CFXML>
</cfoutput>

<cfhttp method="POST" url="https://api.authorize.net/xml/v1/request.api" >
<cfhttpparam type="Header" name="Accept-Encoding" value="deflate;q=0">
<cfhttpparam type="Header" name="TE" value="deflate;q=0">
<cfhttpparam name="body" type="xml" value="#ToString(myXml)#" />
</cfhttp>
---------
And here's the result of cfdump on the cfhttp result:
-------
Charset [empty string]
ErrorDetail I/O Exception: peer not authenticated
Filecontent Connection Failure
Header [undefined struct element]
Mimetype Unable to determine MIME type of file.
Responseheader struct [empty]
Statuscode Connection Failure. Status code unavailable.
Text YES
-----------
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2008 Apr 02, 2008
LATEST
Was this ever resolved? I am having a problem getting this API working as well.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources