The response that comes back from cybersource has a per line item total associated with it. Regardless of whether tax service settings is itemized or Total Only, the TOTAL taxation of that line item is multiplied by the quantity of products within that line item.

So if an order has 4 T-shirts as one line item @ $10 per shirt and $5 of TOTAL tax from those 4 shirts, the resulting Order total will be 4 * 10 + 4 * 5 ($60) instead of the expected 4 * 10 + 5 ($45)

I will be happy to provide the patch if given some direction. i just started looking at the module today, and am less familiar than you experts.

I'm not sure if this should be filed against commerce or commerce_cybersource. Per line 75 of commerce_line_item.controller.inc (unchanged from stable to dev) perhaps it needs to be more flexible here?

foreach ($unit_price['data']['components'] as $key => &$component) {
         $component['price']['amount'] *= $line_item->quantity;
}

Comments

chrisarusso’s picture

Assigned: chrisarusso » Unassigned
Status: Active » Closed (fixed)
chrisarusso’s picture

Issue summary: View changes

Fix syntax error with T shirt example