Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.11
-
Fix Version/s: 4.7.2
-
Component/s: CiviContribute
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
One of our clients reported an issue where their (taxed) Membership Contributions were not being completed due to Paypal not accepting monetary amounts with 3 decimal places.
Steps to Reproduce:
- Add a tax account with a 10% rate to Membership Dues
- Create a Membership with a $145.45 (~$160) fee
- Add a Contribution page with this membership
- (Note contribution amount appears as 159.99 - adding a cent pushes it to $160.01)
- Try to process payment via PayPal WPS
Expected Results: Successful payment, IPN callback, et cetera
Actual Results: Paypal refuses to process the payment, contribution is in pending state forever more.
This is a result of the amount actually being submitted as $159.995
From my investigation, it appears this can be rectified without ill effect by rounding the output of CRM_Contribute_BAO_Contributions_Utils::calculateTaxAmount to two decimal places.