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.
910 sites
542 downloads
50 fans
Current versions available: 3

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 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
  • Picture of JOe Molnar
    Sun, Jul 12, 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
  • Picture of Daniel Neis Araujo
    Wed, Jul 15, 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.
  • Picture of Daniel Neis Araujo
    Wed, Jul 15, 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.
  • Picture of Vincenzo Addario
    Thu, Jul 16, 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?
  • Picture of Techx Bar
    Wed, Jul 22, 2020, 4:10 AM
    Thnx to update plugins https://www.techxbar.co.in
  • Picture of Jonathan Ruisánchez
    Fri, Sep 11, 2020, 12:07 AM
    hello Vincenzo

    Could you solve your doubts? I have the same questions
  • Picture of José Daniel Ameneiros Rodríguez
    Thu, Oct 1, 2020, 4:35 AM
    Is it possible to set payment per theme instead of full course?
  • Picture of Pep p
    Sun, Oct 4, 2020, 10:34 PM
    Is there anyway to add subscription/recurrent payments in the plugin?

    I have a course where users pay a subscription in monthly basis.
    Paypal allows to set up subscription/recurrent payments. Is it possible to integrate this on your plugin? If not, are you thinking on integrate it in the near future?

    Thanks for the great plugin and kind regards
  • Picture of Jonathan Ruisánchez
    Tue, Nov 10, 2020, 5:47 AM
    Hello, does anyone have an answer to Vicenzo's questions
1 2 3 4 5
Please login to post comments