bitpay/ubercart7-plugin — pull request #3 by msupko (2014-01-04 19:24:17+00:00)
Title: Price rounding logic needs to be applied uniformly

Prices in Ubercart, especially those involving taxes, can often go out to more than 2 decimal places. uc_bitpay module accounted for this inconsistently, rounding order totals in some places but not in others.

This created a significant bug on the order review screen which effectively created a new invoice every time cart-review was invoked. This made it impossible to complete such orders as the invoice ID changed every time the customer hit the "Submit" button. It also caused the customer's payment to become "lost"--e.g. disconnected from the order.

This pull request consolidates all rounding logic to a single function (_uc_bitpay_round_price()) and ensures it is applied consistently.