Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35122

Authorize.net enrolment plugin no longer processing responses correctly

XMLWordPrintable

    • MOODLE_19_STABLE
    • Hide

      To fix this bug, edit file: /enrol/authorize/authorizenetlib.php

      Change line 279 from:

      fgets($fp, 4096);

      To be:

      $data = fgets($fp, 4096);

      Then insert this line:

      while (!empty($data) && $data=trim(fgets($fp, 4096))); //get any remaining headers (fix to accommodate extra headers)

      This line would be directly before the "$data = fgets($fp, $length);" line.

      Show
      To fix this bug, edit file: /enrol/authorize/authorizenetlib.php Change line 279 from: fgets($fp, 4096); To be: $data = fgets($fp, 4096); Then insert this line: while (!empty($data) && $data=trim(fgets($fp, 4096))); //get any remaining headers (fix to accommodate extra headers) This line would be directly before the "$data = fgets($fp, $length);" line.
    • Hide

      For a course that has Authorize.net as it's enrolment method, attempt to enrol in the course. Enter all the credit card info and submit it. It will return with an error message, and you will not be enroled in the course.

      Show
      For a course that has Authorize.net as it's enrolment method, attempt to enrol in the course. Enter all the credit card info and submit it. It will return with an error message, and you will not be enroled in the course.

      Sometime around August 24 2012, the Authorize.net enrolment plugin no longer processed responses from Authorize.net properly, causing an error message and students to not be enroled despite successful transactions. The cause was some extra headers being sent back that the plugin was not built to process as it assumed only 1 line of header, which until recently, worked fine.

      I have a simple 2 line fix which will deal with the extra headers.

            danmarsden Dan Marsden
            jking Jeff King
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.