Retrieve Credit Card Processing Results
Posted: Wed Feb 14, 2018 7:28 am
I have a need for a client to send a custom email that includes among other things the results of the credit card authorization from authorize.net. I located where OC 3.02 is putting the info: oc_order_history table, "comment" field. However, when I try to pull that info in real time, I get a blank field back (order_cc_info). If I manually run the same query it returns the expected value. Any ideas?
From line 119 of order.php:
If I do the obvious substituions and run it in phpmyadmin it works as expected:
From line 119 of order.php:
Code: Select all
$order_query = $this->db->query("SELECT *, (SELECT oh.comment FROM `oc_order_history` oh WHERE oh.order_id = '" . (int)$order_id . "' LIMIT 1) AS order_cc_info, (SELECT os.name FROM `" . DB_PREFIX . "order_status` os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status FROM `" . DB_PREFIX . "order` o WHERE o.order_id = '" . (int)$order_id . "'");
Code: Select all
SELECT *, (SELECT oh.comment FROM `oc_order_history` oh WHERE oh.order_id = '109' LIMIT 1) AS order_cc_info, (SELECT os.name FROM `oc_order_status` os WHERE os.order_status_id = o.order_status_id AND os.language_id = o.language_id) AS order_status FROM `oc_order` o WHERE o.order_id = '109'