Bugs: Shipping Tax not passed onto final payment
March this year I reported a case where OSCommerce was not successfully passing shipping tax onto the final payment amount. I found that although the order total was indicated on the confirmation page, the amount processed by the Payment Module was always less the shipping tax amount! A quick diagnosis of the problem indicated that OSCommerce’s developers had intended to calculate once for output on the confirmation page, and then a second time for Payment processing. However, due to the incorrect inclusion order of source files the latter calculation would not complete before the transaction of the Payment Module began.
Resolving this bug is relatively straight forward (as always please backup, and use at own risk):
/*
$Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public Licensend
amended by Richard Lee
*/
CHANGE
$payment_modules->before_process();
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
TO
// make sure we run total's calculations first
$order_totals = $order_total_modules->process();
$payment_modules->before_process();





