Credit card API amount paid rounding error.

Bug #1474566 reported by Bill Erickson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.8
Fix Released
Undecided
Unassigned
2.9
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.8, affects all versions.

Not to be confused with bug #1282751, which I'm fairly certain is a different issue.

This error occurs when calculating the total amount to pay for CC payments in the payments API. The total is created by adding all of the individual fines for the transactions in question, some of which are decimal amounts. The logic is not protected by forcing integer math. This results in rare cases with CC payments of amounts like "9.99999999999", which for us is rejected by PayPal with an "Invalid amount" error.

Branch en route.

Tags: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Fix pushed:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1474566-cc-amount-rounding

Basic testing shows no negative effects. Will test more w/ live data and known troublesome data soon and will report back.

Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Revision history for this message
Bill Erickson (berick) wrote :

Fixed the commit message so that it refers to the correct bug, rebased to master, and force pushed back to the same branch. Added pullrequest tag.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.10-beta
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Is this something that should be backported to 2.9 and 2.8?

Revision history for this message
Ben Shum (bshum) wrote :

Pushed to master and also backported to rel_2_9 and rel_2_8 as a bug fix.

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.