PayPal

Availability restriction ::: availability_paypal
Maintained by Daniel Neis Araujo
An Availability Condition to require a PayPal payment to access activities and resources.
Latest release:
789 sites
323 downloads
74 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

Daniel Neis Araujo (Lead maintainer)
David Mudrák: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Daniel Neis Araujo
    Tue, 3 Mar 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, 2 Apr 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,
  • Andrea Giannini
    Mon, 20 Apr 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!
  • Luca Pasi
    Thu, 21 May 2020, 12:46 AM
    I also have the same need as Vladimir and Daniel. Thank you in advance
  • Matt Barets
    Mon, 1 June 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
  • Jonathan Ruisánchez
    Thu, 25 June 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 "
  • Daniel Neis Araujo
    Mon, 29 June 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.
  • Jonathan Ruisánchez
    Wed, 1 July 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
  • Jonathan Ruisánchez
    Thu, 2 July 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
  • Matt Barets
    Thu, 2 July 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
  • Jonathan Ruisánchez
    Thu, 2 July 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
  • JOe Molnar
    Sun, 12 July 2020, 2:44 PM
    Hello and thank you for this plugin.
    testing this plugin, I found it to successfully enrol a user and collect payment.
    I used it to test a limited time access to a course, and found that regardless of which "Enrolment expiry action" I select ( I tried all three), one the user purchases access and the time expires, that enrolment option is no longer available for them.
    For example, I would like the option for a user to pay a small fee for a 1 day access, after which they can re-purchase the 1 day access as needed. The first time they do this, it works well, however after this, the PayPal option is no longer available for them. I would have thought was the case if "Disable Course Enrolment, and remove roles" was selected, but even when I select " Unenroll User from Course" or "Keep user enrolled", the PayPal purchase is no longer available after the user purchases it once.
    Is there a solution to this please?
    Kind regards,
    Joe
  • Daniel Neis Araujo
    Wed, 15 July 2020, 8:52 PM
    Hi, Joe Molnar

    this plugin here is an availability condition, to restrict access to individual activities or course sections, it's after user enrollment.
    The user enrollment using PayPal is a core feature. You must ask about it on the General Developers Forum.
  • Daniel Neis Araujo
    Wed, 15 July 2020, 8:58 PM
    For those with problems with redirects, please review your configuration on PayPal website and look if you followed the instructions correctly.
  • Vincenzo Addario
    Thu, 16 July 2020, 3:55 AM
    Hello and thank you for the updated plugin. We just got this setup and working with PayPal's sandbox as we don't want to submit actual transactions. I have two questions,

    1) how are the restriction managed? and how can it be removed from an individual that has purchased access to an activity. With the course based PayPal enrollment, unenrolling makes the user repurchase the course. Just wanting to know how to address possible transaction issues that can happen when a paid customer proves they paid via their invoice but access was not granted. How does one manually grant them access to the restricted activity?
    2) When the PayPal form is presented, I was able to update the cost of the item using my browsers developer tools. I can change the cost of a $300 course down to $1 by updating a single form field. PayPal accepted the payment and it seams like there was no validating of form tampering. Hope can this be prevented?
Please login to post comments