Authorize.net provides simple HTML to create a submit button that makes a form request. The form shows up as a full page response to the click of the button. Here is what I use that works.
<form method="post" action="https://test.authorize.net/payment/payment" >
<input type="hidden" name="token" value="#response#" />
<button class="Button" type="Submit">Continue</button>
</form>I need to change this from being a single button and include some of my own stuff first, so I am changing this to do a form post via CFHTTP. Here is (one of ) the things I've tried:
<cfhttp url="https://test.authorize.net/payment/payment" method="post">
<cfhttpparam type="header" name="Accept-Type" value="application/json" />
<cfhttpparam type="formfield" name="token" value="#response#" />
</cfhttp>Rather than getting the full screen that Authorize.net provides, I simply get a response which shows a status code of 200 even though I am using the same data.
Can someone shed some light on why the CFHTTP versions doesn't work?
โ12-02-2026 04:26 AM