Hi

I have encountered the following problem making a payment using Netcash for Ubercart.

The scenario goes as follows:

Product = R25

If I order 10 times Product, order = R250

Shipping = R50

Total Order = R300

If I submit this order to Netcash the amount that I get on the Netcash window is R25. It doesn't pass through the total order amount, it seems to ignore shipping and quantity of product and only pass through the indibidual product amount.

I am using the development version of 1.5 with the the workflow fix.

Thanks

Comments

robin.prieschl’s picture

Hi

I am not too familiar with PHP as yet, but I have compared the old version (Drupal 5) to the current one (Drupal 6).

The old one on line 172 has:

'p4' => uc_currency_format($order->order_total, FALSE, FALSE, '.'),

The current on on line 199 has:

$total = 0;
foreach ($order->products as $product) {
$total += uc_price($product->price, $context, $options);
}
$data["p4"] = $total;

The old one seems to use "order_total" where the current is using uc_price which is taken from the the product price.

Again, not sure if this is the area that could be causing a problem. It reads to me that it is using the product price and not the order total.

norio’s picture

I think the Drupal 6 official project file wasn't updated. To the best of my knowledge, this is the most recent version and it works:
http://drupal.org/files/issues/uc_netcash.tar_.gz

(From: http://drupal.org/node/567244#comment-2038844)

I think Jon and I have just been too busy with other stuff to update CVS. Please try that version - hopefully it works for you.

Your observation about $order->total is correct. The foreach loop is b0rked.

robin.prieschl’s picture

Thanks for your feedback.

Unfortunately I am using that very version you have linked me to and that was the one I was making the comparison with.

It doesn't seem to be working for me.

norio’s picture

Hmmm weird. Unfortunately I can't do much with this right now but I *am* working on a live version of the module that is working. Once it's more complete and I have a little time available, I can upload it here.

norio’s picture

Please try the latest dev version: 6.x-1.x-dev: 2009-Nov-11