Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17848

Taxed Contribution amount is not rounded for processing, causes PayPal WPS issue.

    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:

      1. Add a tax account with a 10% rate to Membership Dues
      2. Create a Membership with a $145.45 (~$160) fee
      3. Add a Contribution page with this membership
      4. (Note contribution amount appears as 159.99 - adding a cent pushes it to $160.01)
      5. 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.

        Attachments

          Activity

            People

            • Assignee:
              rohan1990 Rohan Ramesh Katkar
              Reporter:
              agileware Agileware
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: