<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Authorize.Net - - &#62;On Failed Transaction</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Authorize.Net - - &#62;On Failed Transaction</description>
<language>en</language>
<pubDate>Mon, 04 May 2026 01:42:27 +0000</pubDate>

<item>
<title>enuffsaid on "Authorize.Net - - &#62;On Failed Transaction"</title>
<link>https://www.machform.com/forums/topic/authorizenet-gton-failed-transaction#post-22504</link>
<pubDate>Mon, 12 Jan 2015 09:55:58 +0000</pubDate>
<dc:creator>enuffsaid</dc:creator>
<guid isPermaLink="false">22504@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Greetings,&#60;/p&#62;
&#60;p&#62;&#34;payment_submit_authorizenet.php&#34; is currently set to capture the transaction details and write them to the database when there is a successful transaction. BUT, if the card is declined, nothing is written to the database. &#60;/p&#62;
&#60;p&#62;	if($payment_success === true){&#60;br /&#62;
		$payment_status = &#34;ok&#34;;&#60;br /&#62;
		$_SESSION['mf_payment_completed'][$form_id] = true;&#60;/p&#62;
&#60;p&#62;		//revoke access to form payment page&#60;br /&#62;
		unset($_SESSION['mf_form_payment_access'][$form_id]);&#60;/p&#62;
&#60;p&#62;		//insert into ap_form_payments table&#60;br /&#62;
		$payment_data['payment_fullname'] = trim($payment_data['first_name'].' '.$payment_data['last_name']);&#60;br /&#62;
		$payment_data['form_id'] 		  = $form_id;&#60;br /&#62;
		$payment_data['record_id'] 		  = $payment_record_id;&#60;br /&#62;
		$payment_data['date_created']	  = date(&#34;Y-m-d H:i:s&#34;);&#60;br /&#62;
&#60;strong&#62;  $payment_data['status']			  = 1; &#60;/strong&#62;&#60;br /&#62;
		$payment_data['payment_status']   = 'paid'; &#60;/p&#62;
&#60;p&#62;		$query = &#34;INSERT INTO &#60;code&#62;&#38;quot;.MF_TABLE_PREFIX.&#38;quot;form_payments&#60;/code&#62;(&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;QUESTION&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;Is it possible to update the &#34;else&#34; portion of the statement to write the RESPONSE CODE and accompanying data just as you would for a &#34;1 = APPROVED&#34; transaction? Yes I can review the transaction in Authorize.net, but if you are already accessing the data, why not write it to the database?&#60;/p&#62;
&#60;p&#62;		mf_do_query($query,$params,$dbh);&#60;br /&#62;
	}else{&#60;br /&#62;
		$payment_status = &#34;error&#34;;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
