Item Name on First Data (Payeezy Gateway) Receipts

by | Jun 12, 2015 | osCommerce | 0 comments

The Problem

It seemed like a simple problem and in the end it was and had a simple solution.  Here’s the problem:

The name of the item purchased at an osCommerce store was not showing up on the Payeezy Payment Page or on the emails to the customer or the merchant.

This is a problem because sometimes customer data doesn’t get back to osCommerce after First Data takes their money.  This leaves the merchant with no idea what was ordered.  That information isn’t recorded by osCommerce and it’s not in the First Data merchant email.  The only recourse was to contact the customer and determine what it is they wanted.  As far as I can tell, the failure to get data back to osCommerce is a result of the customer clicking away before the transaction is fully complete.

The Investigation

This system uses a modified SIM payment module (catalog/includes/modules/payment/authorizenet_cc_sim.php).  Please see my earlier post for more on the whole integration between osCommerce and First Data (First Data now calls their payment system ‘Payeezy’).

The required format and the line from the payment module that transfers the information looks like this:

item ID<|> item name<|> item description<|> item quantity<|>item price (unit cost)<|> item taxable‘x_line_item’, ($i+1) . ‘<|>’ . substr($order->products[$i][‘name’], 0, 31) . ‘<|><|>’ . $order->products[$i][‘qty’] . ‘<|>’ . $this->format_raw($order->products[$i][‘final_price’]) . ‘<|>’ . ($order->products[$i][‘tax’] > 0 ? ‘YES’ : ‘NO’

The item name is included as: substr($order->products[$i][‘name’], 0, 31).

The first question was, “is First Data receiving the item name?”  The answer was proven to be yes because when orders fail the x_line_item is echoed back to the merchant in an email like:

 ‘x_line_item’            : 1<|>06. Type 10T<br />UG-050418-T<b<|><|>1<|>320.00<|>NO

so, even with some html in the item name,  First Data obviously had the name in its system.

After a lot of back and forth with the tech people at Payeezy/First Data, I finally decided they might be using ‘item description’ rather than ‘item name’ on both their payment page and their email receipts.  I discovered that was true by making a modification to the payment module and seeing what happened.

The Solution

The simple solution:  put the code for the product name into the field for ‘item description.’  The whole block of code, including the modification of the line shown above now looks like this:

for ($i=0, $n=sizeof($order->products); $i<$n; $i++){ $process_button_string .= tep_draw_hidden_field(‘x_line_item’, ($i+1) . ‘<|>’ . substr($order->products[$i][‘name’], 0, 31) . ‘<|>’ . substr($order->products[$i][‘name’], 0, 31) . ‘<|>’ . $order->products[$i][‘qty’] . ‘<|>’ . $this->format_raw($order->products[$i][‘final_price’]) . ‘<|>’ . ($order->products[$i][‘tax’] > 0 ? ‘YES’ : ‘NO’));


You’ll see this: substr($order->products[$i][‘name’], 0, 31)  in there twice.  The first appearance corresponds to ‘item name’  the second appearance corresponds to ‘item description.’

So,  edit the payment module file as shown, upload it to the server and the item name will appear where it is supposed to appear.