Reply
Highlighted
Member
Posts: 5
Registered: ‎12-05-2017
Accepted Solution

ColdFusion Accept.js

Hello Authorize.NET,

 

After your reponse to this question, I started to work on a proof of concept using Accept.js.  Using the Payment Nonce to construct a XML HTTP request from my server to Authorize, I am getting a response message of "I00001" (Successful).  However, I would like to confirm before I implement our actual solution.  I am using ColdFusion (CFML), and since your documentation happy path does not offer a ColdFusion solution, I used HTTP.  Is it OK to make HTTP request to the following URLs?  If not let me know how am I supposed to do this.

 

Here my server code (proof of concept):

<cfset variables.authorizeHttpResponse  = StructNew()>
<cfset variables.oneTimePaymentResponse = XMLNew()>
<cfxml variable="oneTimePaymentRequest"><cfoutput><createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name>API_LOGIN_ID</name>
    <transactionKey>API_TRANSACTION_KEY</transactionKey>
  </merchantAuthentication>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>15.00</amount>
    <payment>
      <opaqueData>
        <dataDescriptor>#FORM.dataDescriptor#</dataDescriptor>
        <dataValue>#FORM.dataValue#</dataValue>
      </opaqueData>
    </payment>
  </transactionRequest>
</createTransactionRequest></cfoutput></cfxml>

<cftry>
  <cfhttp url="https://apitest.authorize.net/xml/v1/request.api" method="post" result="authorizeHttpResponse" timeout="60">
    <cfhttpparam type="header" value="text/xml" name="Content-Type">
    <cfhttpparam type="body"   value="#oneTimePaymentRequest#">
  </cfhttp>
  
  <cfif structKeyExists(authorizeHttpResponse, "Filecontent")>
    <cfset oneTimePaymentResponse = #xmlParse(authorizeHttpResponse.Filecontent)#>
  </cfif>
  <cfdump var="#authorizeHttpResponse#"  label="authorizeHttpResponse">
  <cfdump var="#oneTimePaymentResponse#" label="oneTimePaymentResponse">
  
  <cfcatch type="any">
    <cfdump var="#cfcatch#">
  </cfcatch>
</cftry>

Accepted Solutions
Highlighted
Solution
Accepted by topic author Shapeous
‎12-22-2017 01:52 PM
Member
Posts: 5
Registered: ‎12-05-2017

Re: ColdFusion Accept.js

Thanks @Anurag,

 

I also found this example which more closely matches what I am doing.

 

https://github.com/AuthorizeNet/accept-sample-app/blob/master/transactionCaller.php

 

Thanks for confirming,

View solution in original post


All Replies
Highlighted
Posts: 333
Kudos: 59
Solutions: 36
Registered: ‎03-13-2017

Re: ColdFusion Accept.js

Hi @Shapeous

 

Yes you can make API calls to the below URLs . 

 

You can use our API reference for testing the APIs 

 

https://developer.authorize.net/api/reference/index.html

 

 

Also check our SDK/Sample code at https://github.com/AuthorizeNet 





Send feedback at developer_feedback@authorize.net
Highlighted
Solution
Accepted by topic author Shapeous
‎12-22-2017 01:52 PM
Member
Posts: 5
Registered: ‎12-05-2017

Re: ColdFusion Accept.js

Thanks @Anurag,

 

I also found this example which more closely matches what I am doing.

 

https://github.com/AuthorizeNet/accept-sample-app/blob/master/transactionCaller.php

 

Thanks for confirming,

Highlighted
Contributor
Posts: 10
Registered: ‎02-06-2018

Re: ColdFusion Accept.js

Hello

 

I am doing an emergency CFM (Coldfusion conversion) to accept.js hosted form- is this possible? or should I follow the below sort of example?

 

Madeleine

Highlighted
Member
Posts: 5
Registered: ‎12-05-2017

Re: ColdFusion Accept.js

That's what we did here at AlbanyMed, so yes it is possible.  Using the Accept.js implementation together with the sample code above, you should be able to put together a prrof of concept.

 

Best of luck,