You already had the po_number field in the list of fields.
But you didn't have the "value" specified in the list of values.
So, add the value, using the concept shown below. I've quoted your earlier code snippet, and shown both your own change as well as the additional required change. I've assumed that the variable containing the value of the PO Number entered by your customer is called $po_number. If it's not, you'll need to change it to suit.
Granted, this all assumes that storing the PO Number in the same record as the CC confirmation is the correct approach ... something I'm not convinced of myself. The code I've shown below only contains an edit to make the list of fields match the list of values. That's all. As I said, I'm not convinced that this is the best solution to your root problem. It will simply resolve the specific error message you mentioned.
If you want specific help on writing new functionality for your store, you may need to start a new topic for that and/or hire someone to do the coding for you.
gfogleman:
My code in catalog/includes/modules/payment/authorizenet_aim.php is:
function after_process() {
global $insert_id, $db;
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (comments, po_number, orders_id, orders_status_id, date_added) values ('Credit Card payment. AUTH: " . $this->auth_code . ". TransID: " . $this->transaction_id . ".' ,** '" . $po_number . "', **'". (int)$insert_id . "','" . $this->order_status . "', now() )");
return false;
}
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.