osCommerce and Authorize.net
Buy Gary A Beer?
Buying me a "beer" helps me to keep my contributions updated and keep this blog alive - and you get a link from my homepage to your site. Cheers!
I've been working on some stores which use the AIM version of Authorize. It's a decent payment system as far as I can see.
I installed my disocunt coupon system on the store, and tested a purchase via Authorize. The discount amount was not picked up...so a quick hunt in the osCommerce forum led me to this post from vGer where the fix is shown.
Basically, you have to move 1 line of code. So open up checkout_process.php and find this:
-
// load the before_process function from the payment modules
-
$payment_modules->before_process();
-
-
require(DIR_WS_CLASSES . 'order_total.php');
-
$order_total_modules = new order_total;
-
-
$order_totals = $order_total_modules->process();
and change it to this:
-
require(DIR_WS_CLASSES . 'order_total.php');
-
$order_total_modules = new order_total;
-
-
$order_totals = $order_total_modules->process();
-
-
// load the before_process function from the payment modules
-
$payment_modules->before_process();
In effect what we are doing is loading the order_totals before the payment modules - so that the payment module Authorize.net can pick up any changes to the order_totals before asking for the correct payment amount.
Thanks, vGer.


