Moodle plugins directory: PayPal | Moodle.org
PayPal
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/
- You may use composer
- or git clone
- or download the latest version from https://github.com/danielneis/moodle-availability_paypal/archive/master.zip
- 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
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).
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,
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
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.
sorry my english, I used a translator
thanks and regards
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
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
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.
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?