Credit card API amount paid rounding error.
Bug #1474566 reported by
Bill Erickson
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.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.