Now you can grab the card number and expiration date from a declined (when the card is still good) Authorizenet_AIM transaction and hold it in the Held Orders table before the order is processed. Once the order is declined for invalid reasons, you can work on recovering your temporarily lost sale (processor issues, card code issues).
To do this, just barrow some code from checkout_process.php, moved it up a few notches and give it another table to use.
Before (find this):
require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process();
After:
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
// START get Authorizenet_AIM card numbers inserted into Held_Orders table by TADD
$sql_data_array = array('customers_id' => $customer_id,
'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
'cc_number' => $order->info['cc_number'],
'cc_expires' => $order->info['cc_expires'],
'date_purchased' => 'now()');
tep_db_perform(TABLE_HOLDING_ORDERS, $sql_data_array);
// FINISH get Authorizenet_AIM card numbers inserted into Held_Orders table by TADD
$order_totals = $order_total_modules->process();
Hope this helps!
TADD















