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

Authorize.net - too big amount saved successfully despite error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Important
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.15
    • Fix Version/s: 4.7.18
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      Steps to reproduce:

      • setup authorize.net payment
      • issue donation of huge amount (in my case $1,250,000 - one million)
      • response is error, yet contribution is saved as successful

      Problem lies in how authorize net is handling error. It's simply marked as failed (and problably later marked as completed).

      Response from auth.net API is: code=3, message=The transaction amount submitted was greater than the maximum amount allowed.

      I am not sure, but it seems like this part of AuthorizeNet.php file:

            case self::AUTH_ERROR:
              $params['payment_status_id'] = array_search('Failed', $contributionStatus);
              break;
      

      should be changed to:

            case self::AUTH_ERROR:
              $params['payment_status_id'] = array_search('Failed', $contributionStatus);
              $errormsg = $response_fields[2] . ' ' . $response_fields[3];
              return self::error($response_fields[1], $errormsg);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              flies Arkadiusz Rzadkowolski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: