Promotion Not Calculated Correctly With Payment Gateway

We are using version 3.06 and Itrsansact as our payment gateway. We have noticed Itransact is not correctly taking the promotion discount.



For example,



CS-Cart shows

8 item(s) $150.92

Shipping $16.95

Order discount -$5.00

Order Total $162.87



I transact charges the credit card $167.87



In the past we modified the itransact_standard_form.php to show the ordered products separately on the Itransact log by commenting out some lines and adding a product loop like:



// filling order cost
// $post['item_1_desc'] = fn_get_lang_var('order_id') . ': ' . $processor_data['params']['order_prefix'] . $order_id . ($order_info['repaid'] ? "_{$order_info['repaid']}" : '');
// $post['item_1_cost'] = $order_info['total'];
// $post['item_1_qty'] = 1;

// Mod to add Cart Contents
$i = 1;
// Add Products
if (!empty($order_info['items'])) {
foreach ($order_info['items'] as $k => $v) {
$suffix = '_'.($i++);
$v['product'] = htmlspecialchars(strip_tags($v['product']));
$v['price'] = fn_format_price(($v['subtotal'] - fn_external_discounts($v)) / $v['amount'], $paypal_currency);
$post['item' . $suffix . '_desc'] = $v['product'];
$post['item' . $suffix . '_cost'] = $v['price'];
$post['item' . $suffix . '_qty'] = $v['amount'];
}
}
//End Mod to add Cart Contents




How do I include the discount to show at the Itransact end?



Thanks,

David