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

CLONE - eWay processing amounts over $1000

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 4.3.6
    • Component/s: None
    • Labels:
      None

      Description

      For at least the Australian locale, a comma is inserted for amounts over $1000 (eg. $1,000).

      eWay processes the amounts in cents, which CiviCRM translates the amount entered to using the code: $amountInCents = round(((float) $params['amount']) * 100);

      This is fine for any amount less than $1,000 but once it gets to $1,000 or above, it returns a lower value than what was entered (eg. $1,000 = $1).

      The comma has to be stripped from the amount before it's converted in cents. I've done a quick modification for a client where the $params['amount'] is going into a str_replace() function to strip the comma, and then outputting the amount without the comma into the rounding function.

        Attachments

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              agileware Agileware
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: