Dr. Byte,
I believe I have identified the problem (or at least part of it). We've had the problem already repeat a couple of times, and one of the customers sent us the error message she received, which happens to be a MySQL error caused by an apostrophe in a product name.
I've temporarily fixed this in /includes/modules/payment/authorizenet_aim.php, line 463. This is just a temporary fix, and I don't recommend it for anyone!
PHP Code:
$db->Execute("insert into " . TABLE_AUTHORIZENET . " (id, customer_id,order_id, response_code, response_text, authorization_type, transaction_id, sent, received, time, session_id) values ('', '" . $_SESSION['customer_id'] . "', '" . $new_order_id . "', '" . $db_response_code . "', '" . $db_response_text . "', '" . $db_authorization_type . "', '" . $db_transaction_id . "', '" . print_r($reportable_submit_data, true) . "', '" . $response_list . "', '" . $order_time . "', '" . $db_session_id . "')");
the apostrophe in the product name gets put in the print_r($reportable_submit_data, true), so I just added an addslashes:
PHP Code:
$db->Execute("insert into " . TABLE_AUTHORIZENET . " (id, customer_id,order_id, response_code, response_text, authorization_type, transaction_id, sent, received, time, session_id) values ('', '" . $_SESSION['customer_id'] . "', '" . $new_order_id . "', '" . $db_response_code . "', '" . $db_response_text . "', '" . $db_authorization_type . "', '" . $db_transaction_id . "', '" . addslashes(print_r($reportable_submit_data, true)) . "', '" . $response_list . "', '" . $order_time . "', '" . $db_session_id . "')");
We were previously (until last week) using Zen Cart 1.3.0.2, and the $data variable was inserted into the database, which had been passed through the urlencode function, so the apostrophe was taken care of. In 1.3.7.1, the $reportable_submit_data array doesn't appear to go through any cleaning before being inserted. I see this variable being used elsewhere in the module, but I did not try to come up with a real fix, as I don't understand the code well enough.
We have a number of popular products with apostrophes, so I'm guessing that's why others have only been hit by this intermittently.
I had not made any previous mods to this file. I am using Sales Order, News & Article Management, About Us Page, Column Layout, Better Categories, and Easy Populate mods, nothing that does anything with orders. I do have the database storage on.
Thanks,
Jason