hello again,
I have a recurring problem every no and then with authorize.net approving a transaction that my form registers as being rejected on the basis of an expired card.
To fix this issue I thought of two things:
1. set the card expiration month and year to always be greater than today.
2. check to see if I am sending authorize.net two submissions.
I am not sure how to set up the code to display an array of numbers that start from today etc - so I went to check the #2 option and I was curious. I have
On Submit Before sending email, and I have authorize.net plugin set to go before sending email. $emails[0]->enabled = 0; keeps the form from sending email but does it still send to authorize.net??
I have a recurring problem every no and then with authorize.net approving a transaction that my form registers as being rejected on the basis of an expired card.
To fix this issue I thought of two things:
1. set the card expiration month and year to always be greater than today.
2. check to see if I am sending authorize.net two submissions.
I am not sure how to set up the code to display an array of numbers that start from today etc - so I went to check the #2 option and I was curious. I have
<?php
global $cf_AUTHNET_response_code, $cf_AUTHNET_response_subcode, $cf_AUTHNET_response_reason_code, $cf_AUTHNET_response_reason_text, $cf_AUTHNET_approval_code, $cf_AUTHNET_avs_result_code, $cf_AUTHNET_transaction_id;
// If the form has just been submitted
// re-display with Edit & Pay buttons
if ( $_POST['submit'] == 'Process') {
$_POST['submit'] = 'Confirm';
$error_found = true;
$emails[0]->enabled = 0;
showform($_POST);
} elseif ( $_POST['submit'] == 'Edit') {
$_POST['submit'] = 'Submit';
$error_found = true;
$emails[0]->enabled = 0;
showform($_POST);
} elseif ( $_POST['submit'] == 'Pay') {
$_POST['AUTHNET_response_code'] = $anet_response_code;
$_POST['AUTHNET_trans_id'] = $anet_trans_id;
if($cf_AUTHNET_response_code == 'Declined'){
$rows[0]->emailresults = 0;
}
echo '<p style="font-size:2em; font-weight:bold;">' .$cf_AUTHNET_response_code .'</p>';
if ($cf_AUTHNET_response_code == 'Declined' || $cf_AUTHNET_response_code != 'Approved') {
echo '<p>Sorry your transaction was declined by the payment gateway.<br>Please try again.</p>';
}else{
echo '<h5>Thank-you for your submission.<br> An email confirmation should be sent to you shortly.</h5>';
}
echo '<p align="center"><a href="javascript:window.close();">Close Window</a></p>';
}
?>
On Submit Before sending email, and I have authorize.net plugin set to go before sending email. $emails[0]->enabled = 0; keeps the form from sending email but does it still send to authorize.net??