Availability conditions: PayPal

availability_paypal
Maintained by Picture of Daniel Neis AraujoDaniel Neis Araujo
An Availability Condition to require a PayPal payment to access activities and resources.
753 sites
855 downloads
46 fans
Current versions available: 4

PayPal Availability Condition

With this plugin you can put a price in any course content and ask for a PayPal payment to allow access.
The person in charge to configure the enrolment method on the course will be able to configure the enrolment cost's value and currency.
The user will be able to pay in some other currency at PayPal website. The conversion rates will be calculated and applied by PayPal.

Install

  • Put these files at moodle/availability/condition/paypal/
  • Log in your Moodle as Admin and go to "Notifications" page
  • Follow the instructions to install the plugin
  • You must set the "Return URL" at PayPal to https://YOURMOODLESITEADDRESS/availability/condition/paypal/ipn.php (this may conflict with Moodle's enrollment PayPal plugin, make sure you use separate apps if you use PayPal enrollment)
  • You must activate the IPN at your PayPal account
  • You must have HTTPS enabled and working on your Moodle site

Usage

This works like the PayPal enrol plugin, but instead of restricting the full course, you can restrict individual activities, resources or sections (and you can combine it with other availability conditions, for example, to exclude some group from paying using and "or" restriction set).

For each restriction you add, you can set a business email address, cost, currency, item name and item number.

Funding

The development of this plugin was funded by TRREE - TRAINING AND RESOURCES IN RESEARCH ETHICS EVALUATION - http://www.trree.org/

Dev Info

Please, report issues at: https://github.com/danielneis/moodle-availability_paypal/issues

Feel free to send pull requests at: https://github.com/danielneis/moodle-availability_paypal/pulls

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4

Contributors

Picture of Daniel Neis Araujo
Daniel Neis Araujo (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Lucia Lence
    Wed, Dec 11, 2019, 7:59 PM
    The submitted comment was:

    When I pay with paypal it redirect to the activity in moodle but it doesn't recognize the payment.

    This is the error log.

    500 POST /availability/condition/paypal/ipn.php PayPal IPN

    Warning FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/var/www/vhosts/moodle.prueba.edu/httpdocs/lib/eventslib.php): failed to open stream: No such file or directory in /var/www/vhosts/moodle.prueba.edu/httpdocs/availability/condition/paypal/ipn.php on line 36" while reading response header from upstream

    Can anyone help me?
  • Picture of Crescenciano Olvera
    Tue, Dec 31, 2019, 2:09 AM
    Hi Daniel,

    Thank you for your work inthis plugin.

    I have a problem with the plugin. In my moodle site version 3.8 and Adaptabel theme.
    I installed it, activated my IPN in my PayPal account and I use HTTPS .

    But the restricted activity only show a green rectangule with the word "Restricted", when the cursor place over it, it show a massage as follows:

    "Restricted, Not available at least you made a payment with PayPal"

    And it do not have any link that show me the payment request.

    Please let me know if I need to do anything more in order to have this plugin working.

    I will appreciate your answer...

    C. Olvera
  • Picture of Daniel Neis Araujo
    Wed, Feb 19, 2020, 3:13 AM
    Hi,
    I made available on github a new version that must be compatible with 3.6, 3.7 and 3.8
    Can someone test and give feedback, please? If it works I'll publish here too.
    https://github.com/danielneis/moodle-availability_paypal/
  • Picture of Stephanie Worden
    Fri, Feb 28, 2020, 11:30 PM
    My company is looking to take PayPal payments for courses in Moodle, but I have a question. Does this plugin have the ability for customers to pay different amounts to access a course? Some of our customers buy courses individually, while others pay for a set of courses at a discounted rate. Most customers pay a monthly fee to access the courses, but that monthly fee will vary depending upon how many students they are enrolling. From what I've read so far, it looks like I set one fee to access a course. Can I set up different payment plans for the same course?
  • Picture of Daniel Neis Araujo
    Tue, Mar 3, 2020, 4:44 AM
    Hi, Stephanie

    this plugin is for availability condition on resources, activities and course sections/topics, not for the enrolment method. The enrolment method, which will let users access courses upon payment is standard feature of Moodle. You should post your question at https://moodle.org/mod/forum/view.php?id=55 (General Developer Forum).
  • profil Vladimir | Kawalearn
    Thu, Apr 2, 2020, 3:55 PM
    Hello,
    Thank you for this plugin I would like to test on Moodle 3.8.
    I put a restriction on a section and have the link for Paypal. But whenI I click on it, I have this error message : "error/support to sections not yet implemented." and it doesn't work.
    Do you have any idea ?
    Regards,
  • Picture of Andrea Giannini
    Mon, Apr 20, 2020, 9:07 PM
    Hi Daniel, I have the same problem as Vladimir. Will there be an update for the section implementation? Thank you very much!
  • Picture of Luca Pasi
    Thu, May 21, 2020, 12:46 AM
    I also have the same need as Vladimir and Daniel. Thank you in advance
  • Picture of Matthieu Barets
    Mon, Jun 1, 2020, 6:25 AM
    Hi,

    I confirm the same issue with the error message "error/no PayPal condition for this context." at the module level.

    The PayPal enrolment goes through fine.

    Is this plugin compatible with the PayPal enrolment plugin? The PayPal IPN settings allows only one URL.

    Regards
    Matt
  • Picture of Jonathan Ruisánchez
    Thu, Jun 25, 2020, 8:26 AM
    Hello, I am testing the new version but when configuring the restriction in an activity, and the student tries to enter the activity, it says that he cannot enter unless he makes the payment with paypal, but the link gives an error and says "error / no paypal condition for this context "
  • Picture of Daniel Neis Araujo
    Mon, Jun 29, 2020, 10:21 PM
    Hi,
    I re-tested the plugin in Moodle 3.8.3 and released a version with fixes and support for adding it on course sections.

    This plugin may not be compatible with using PayPal enrollment.
  • Picture of Jonathan Ruisánchez
    Wed, Jul 1, 2020, 4:45 AM
    Hello, I appreciate the developer's work, this latest version fixes the error that I was marking, I could already test a payment, but it does not redirect me or give me access to the activity that I paid, I do not know if it is because they pay with my paypal user which is a different email than my moodle user.

    sorry my english, I used a translator

    thanks and regards
  • Picture of Jonathan Ruisánchez
    Thu, Jul 2, 2020, 12:56 AM
    I just did another test, I already made a payment with the same email as my moodle user and after making the payment in paypal, it does not redirect me or give me access to the activity I paid for ... greetings and thanks
  • Picture of Matthieu Barets
    Thu, Jul 2, 2020, 4:36 AM
    Hi Jonathan

    On my site, after the payment on PayPal, it redirects to the PayPal page of the plugin (where the price and the send payment button are shown).

    If that is the case for you, I think it is normal behaviour. The course navigation or breadcrumb can be used.

    Myself I think I'll look at adding a button to return to the course (doable with a bit of JavaScript).

    Regards
    Matt
  • Picture of Jonathan Ruisánchez
    Thu, Jul 2, 2020, 9:47 AM
    hello, indeed it happens to me the same, after making the payment in paypal, it takes me to the page of moodle where it puts the price and the paypal button, but it does not give me access to the activity or section that I paid, thanks for your help, best regards
1 2 3 4 5
Please login to post comments