swguy:
Approved and link in first post updated.
checkout payment, should be done after shipping and local taxes. payments are always done last in any sane shopping cart. why would one pay prior to knowing a total.
The JS you put your code in loads before the page builds the order completely. So this won't work if there are order total modules that modify the bottom line.
the problem that you are, in theory, presenting is inherent in the structure of zen-cart. and has been something that i have discussed previously on github.
the idea that there is an order_total module called ot_total that just takes what is in the $order->info['total'] is, to me, one of the many problems inherent in the structure of zen-cart. i am not a fan of this structure, but understand how legacy code works.
the latest update that i have submitted fixes an issue with OPC, and will be the last update i issue under real store owners decide to use it and report problems.
best.
author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.