ok.
I found this info from authorize.net site about the x_line_item array:
Based on their respective business requirements, merchants can choose to submit itemized order information with a transaction. Itemized order information is not submitted to the processor and is not currently returned with the transaction response. This information is displayed on the Transaction Detail page and in QuickBooks download file reports in the Merchant Interface.
So I decided to add code to get the x_description field to show order info to the authorize.php file:
Added this line: $vars["x_description"]=""; before the loop
Then added this line after $vars["x_line_item"]...:
$vars["x_description"]=$vars["x_description"].'Product Code: '.$product->order_product_code.', Product Name: '.$product->order_product_name.', Quantity: '.$product->order_product_quantity.', Price: '.round($product->order_product_price,(int)$currency->currency_locale).'\r\n';
This code adds product order info to the authorize.net receipt by filling the x_description field. However, the Product Code is not coming through, but rather, the product code is the same as the product name. Is there something I'm doing wrong?
Full code snippet below:
$vars["x_description"]="";
$vars["x_line_item"]=array();
foreach($order->cart->products as $product){
if(bccomp($product->order_product_tax,0,5)){
$tax+=$product->order_product_quantity*round($product->order_product_tax,(int)$currency->currency_locale['int_frac_digits']);
$has_tax = 'TRUE';
}else{
$has_tax = 'FALSE';
}
$vars["x_line_item"][]=substr($product->order_product_code,0,30).'<|>'.substr(strip_tags($product->order_product_name),0,30).'<|><|>'.$product->order_product_quantity.'<|>'.round($product->order_product_price,(int)$currency->currency_locale['int_frac_digits']).'<|>'.$has_tax;
$vars["x_description"]=$vars["x_description"].'Course Number: '.$product->order_product_code.', Course Name: '.$product->order_product_name.', How many signups: '.$product->order_product_quantity.', Price: '.round($product->order_product_price,(int)$currency->currency_locale['int_frac_digits']).'\r\n';
}