Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Need help fixing iVeri Payment module that doesn't work


Recommended Posts



I'm wondering if anyone can help me. I downloaded the iVeri contribution and keep having problems when submitting to iVeri. The total and the products total don't balance if you have tax set up. It requires this in order to process the transaction.


The contrib can be found at http://addons.oscommerce.com/info/1116. The version added on 2 Jun 2006.


Here is the code that seems to have the problem on line 194:

$process_button_string.=tep_draw_hidden_field('Lite_Order_LineItems_Amount_'.($i+1), $order->products[$i-1]['price']*100);


The tax is not added to the price and therefore does not balance. I tried using code similar to this,

$process_button_string.=tep_draw_hidden_field('Lite_Order_LineItems_Amount_'.tep_add_tax($order->products[$i-1]['final_price'], $order->products[$i-1]['tax'])*100);


which gave me the price+tax, but I then had a rounding issue as the final price, but when multiplied by 100 to get cents for submitting, I had a fraction at the end which iVeri does not accept.


Any idea how to fix this? Your urgent assistance is GREATLY appreciated.

Link to comment
Share on other sites

have you turned on the tax setting to display?

admin > configuration > my store


Admin > configuration > Modules > order total


Also you need to set up Zones and apply them


I did all that. It seems that when it pulls the price from the order, it pulls the nett price instead of the gross. I have temporarily corrected the problem by forcing tax which is fine for selling local, but if we move to international sales, the tax will automatically be applied and then the total excluding tax will not balance items which will automatically have tax added by force and the transaction will not go through.


I went to the orders.php in admin and found some code seems to add tax if applicable that may correct the problem, but there is a problem with the line. Not knowing PHP, I don't have a clue how to correct it. Can anyone help?


line before:

$process_button_string.=tep_draw_hidden_field('Lite_Order_LineItems_Amount_'.($i+1), $order->products[$i-1]['price']*100);


Proposed line:

$process_button_string.=tep_draw_hidden_field('Lite_Order_LineItems_Amount_'.($i+1), tep_add_tax($order->products[$i-1]['final_price']*100));

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...