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

Paypal auto-enrol does not work with Moodle 2.3

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Visit <yoursite>/admin/settings.php?section=manageenrols and turn on PayPal.
      2. Click on the settings and set PayPal business email to 'markn_1351839182_biz@moodle.com' (you can use yours if you have one set up)
      3. In the config.php file add '$CFG->usepaypalsandbox = true;'
      4. Create a course that uses the PayPal enrolment plugin and set the price to $1.
      5. Log in as a student and click on the course, then the PayPal link.
      6. Enter your email as 'markn_1351765059_per@moodle.com' (again, use another one if you have an account set up) and the password '12345678'.
      7. Confirm payment and click on the link to go back to your Moodle site.
      8. Ensure the following error does not occur -

      Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result

      Note: You will not be enrolled in the course as PayPal needs to be able to communicate to your localhost server. This test simply ensures the PHP error does not occur which the community has reported is causing the issue with users not enrolling.

      Show
      Visit <yoursite>/admin/settings.php?section=manageenrols and turn on PayPal. Click on the settings and set PayPal business email to 'markn_1351839182_biz@moodle.com' (you can use yours if you have one set up) In the config.php file add '$CFG->usepaypalsandbox = true;' Create a course that uses the PayPal enrolment plugin and set the price to $1. Log in as a student and click on the course, then the PayPal link. Enter your email as 'markn_1351765059_per@moodle.com' (again, use another one if you have an account set up) and the password '12345678'. Confirm payment and click on the link to go back to your Moodle site. Ensure the following error does not occur - Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result Note: You will not be enrolled in the course as PayPal needs to be able to communicate to your localhost server. This test simply ensures the PHP error does not occur which the community has reported is causing the issue with users not enrolling.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35349_master

      Description

      Payment goes through. IPN History shows return code of 200 for the transaction. Receipt is sent twenty minutes after payment notification is sent (money definitely flows, just not fast).

      User gets: "Thank you for your payment! Unfortunately your payment has not yet been fully processed". Does not get enroled.

      PHP errors read:
      Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result
      line 458 of /lib/pagelib.php: call to debugging()
      line 1429 of /lib/pagelib.php: call to moodle_page->magic_get_context()
      line 1444 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
      line 55 of /enrol/paypal/return.php: call to bootstrap_renderer->__call()
      line 55 of /enrol/paypal/return.php: call to bootstrap_renderer->header()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              markn Mark Nelson
              Reporter:
              akmiecik Alan Kmiecik
              Peer reviewer:
              Andrew Davis
              Integrator:
              Dan Poltawski
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Nov/12