Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Very nice tasks, it should not be difficult for anybody who already tried to developed something with PayPal services using the sandbox accounts.

      Potential benefits:

      • finally we could have multiple instances each with different cost & role
      • option for extending of enrolments
      • final solution for currencies
      • etc.

      This should work 100% because money are involved directly

        Gliffy Diagrams

        1. paypal_plugin_20100714.patch
          59 kB
          Eugene Venter
        2. paypal_plugin_2010071401.patch
          59 kB
          Eugene Venter
        3. paypal_plugin_20100715.patch
          60 kB
          Eugene Venter
        4. paypal_plugin_20100716.patch
          63 kB
          Eugene Venter

          Activity

          Hide
          Martin Dougiamas added a comment -

          Another one for you, Aaron. http://docs.moodle.org/en/Paypal

          In a nutshell, a user trying to enter a course using this gets a form with a Paypal "Pay now" button. They go to PayPal, send money, PayPal then calls a Moodle return script directly and enrols the user, so when the user next tries to enter that course, they can. Magic.

          Used to work fine, just needs updating to the new enrol classes like the others.

          If it's easy to fix the things Petr mentioned along the way all the better, but at a minimum we just need to match the features we had before.

          You will need to use a real Paypal account: they offer a sandbox for developers who are testing: https://developer.paypal.com/

          Show
          Martin Dougiamas added a comment - Another one for you, Aaron. http://docs.moodle.org/en/Paypal In a nutshell, a user trying to enter a course using this gets a form with a Paypal "Pay now" button. They go to PayPal, send money, PayPal then calls a Moodle return script directly and enrols the user, so when the user next tries to enter that course, they can. Magic. Used to work fine, just needs updating to the new enrol classes like the others. If it's easy to fix the things Petr mentioned along the way all the better, but at a minimum we just need to match the features we had before. You will need to use a real Paypal account: they offer a sandbox for developers who are testing: https://developer.paypal.com/
          Hide
          Eugene Venter added a comment -

          Hi there,

          Please see the attached patch for an upgraded PayPal enrolments plugin.

          Cheers,
          Eugene.

          Show
          Eugene Venter added a comment - Hi there, Please see the attached patch for an upgraded PayPal enrolments plugin. Cheers, Eugene.
          Hide
          Eugene Venter added a comment -

          Oops!

          Cocked up the version number ; see the latest attachment for the correct patch.

          Show
          Eugene Venter added a comment - Oops! Cocked up the version number ; see the latest attachment for the correct patch.
          Hide
          Petr Skoda added a comment -

          1/

          $mailstudents = $plugin->get_config('enrol_mailstudents');
          $mailteachers = $plugin->get_config('enrol_mailteachers');
          $mailadmins = $plugin->get_config('enrol_mailadmins');

          from ipn.php deos not look correct

          2/ the instance id should be somewhere in enrol_paypal table, right? Otherwise we do not know which instance in course it is belonging to

          3/ if ($users = get_users_by_capability($context, 'moodle/course:update', 'u.*', 'u.id ASC',
          should be probably replaced by the new CFG->coursecontact but it should be probably done later, maybe 2.1

          The rest looks ok if it works, I do not have a setup to actually test it, thanks!

          Show
          Petr Skoda added a comment - 1/ $mailstudents = $plugin->get_config('enrol_mailstudents'); $mailteachers = $plugin->get_config('enrol_mailteachers'); $mailadmins = $plugin->get_config('enrol_mailadmins'); from ipn.php deos not look correct 2/ the instance id should be somewhere in enrol_paypal table, right? Otherwise we do not know which instance in course it is belonging to 3/ if ($users = get_users_by_capability($context, 'moodle/course:update', 'u.*', 'u.id ASC', should be probably replaced by the new CFG->coursecontact but it should be probably done later, maybe 2.1 — The rest looks ok if it works, I do not have a setup to actually test it, thanks!
          Hide
          Eugene Venter added a comment -

          Hi Petr,

          You can check out the latest attached patch. It now includes those ipn config fixes you pointed out, as well as a db upgrade script that adds an instanceid field to the enrol_paypal table.

          Cheers,
          Eugene.

          Show
          Eugene Venter added a comment - Hi Petr, You can check out the latest attached patch. It now includes those ipn config fixes you pointed out, as well as a db upgrade script that adds an instanceid field to the enrol_paypal table. Cheers, Eugene.
          Hide
          Petr Skoda added a comment -

          strange, it looks like you did not use the xmldb editor to make the install.xml changes and upgrade.php - missing field in install,xml, missing savepoint in upgrade.php

          Show
          Petr Skoda added a comment - strange, it looks like you did not use the xmldb editor to make the install.xml changes and upgrade.php - missing field in install,xml, missing savepoint in upgrade.php
          Hide
          Eugene Venter added a comment -

          lol, I didn't use the Editor, will do so henceforth , thanks!

          Ps. I've attached a latest patch.

          Hope this helps,
          Eugene.

          Show
          Eugene Venter added a comment - lol, I didn't use the Editor, will do so henceforth , thanks! Ps. I've attached a latest patch. Hope this helps, Eugene.
          Hide
          Petr Skoda added a comment -

          +1 for the commit

          Show
          Petr Skoda added a comment - +1 for the commit
          Hide
          Martin Dougiamas added a comment -

          yay!

          Show
          Martin Dougiamas added a comment - yay!
          Hide
          Petr Skoda added a comment -

          reopening, the currency default is incorrect which creates problems during install

          Show
          Petr Skoda added a comment - reopening, the currency default is incorrect which creates problems during install
          Hide
          Petr Skoda added a comment -

          fixed

          Show
          Petr Skoda added a comment - fixed

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: