Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: PayPal enrolment.

PayPal enrolment: Difference between revisions

From MoodleDocs
(→‎See also: Link to meta courses)
(updating instructions for Boost)
 
(46 intermediate revisions by 13 users not shown)
Line 1: Line 1:
Location: PayPal edit settings link in ''Administration > Courses > [[Enrolment plugins|Enrolments]]''
{{Enrolment}}
The PayPal enrolment plugin allows users to pay for courses and then be automatically enrolled.


==PayPal account creation==


The PayPal enrolment plugin allows you to set up paid courses. It may be enabled via ''Site administration > Courses > Enrollments''.  You can use the edit link to set a standard course cost default.
# Go to https://www.paypal.com and create a PayPal account. Not required but recommended for selling: Upgrade your account to "Premier" status and get "Verified".
# Set the Encoding to UFT-8. In Paypal, go to ''Profile > Language Encoding'' (under the Selling Preferences column) and set your website's language (like select "Western European Languages (including English)" as it is the only English version)Then click on the "More Options" button and set the Encoding to "UTF-8", select "Yes" to use the same encoding for data sent from PayPal to you, and save.
# Optionally setup IPN in PayPal to interact with Moodle.  Log into PayPal, go to "Profile > Instant Payment Notifications (IPN)”, click "Turn On IPN", click the "Edit settings" and enter a URL that references your IPN file in your Moodle installation (for example: <nowiki>http://<domain name>/moodle/enrol/paypal/ipn.php</nowiki>).


==Course costs==
==Enabling PayPal enrolment==
Costs for each course can be set separately. If the cost for any course is zero, then students are not asked to pay at the time of enrolment into the course. However, if there is a site wide default course cost, you may override that in your course settings.


If the course cost field is not empty, then students trying to enrol will be presented with the option of making a payment to enter.
An administrator can enable PayPal file enrolment as follows:


If you ALSO enter an [[Enrolment key|enrolment key]] in the course settings, then students will also have the option to enrol using a key. This is useful if you have a mixture of paying and non-paying students.
# ''Go to Site administration > Plugins > Enrolments > Manage enrol plugins'' and click the eye icon opposite PayPal. When enabled, it will no longer be greyed out. [[Manual enrolment]] must also be enabled, since the PayPal plugin requires it.
# Click the settings link, configure as required (see details of settings below), then click the 'Save changes' button.


==Verifying the default encoding==
* PayPal business email - This setting is case sensitive and must exactly match that in PayPal
{{Moodle 1.8}}If you are using Moodle 1.8 or later, you need to verify the default encoding in your PayPal business account as follows:
* Default role assignment - This means the role that a new user will automatically be given in a course when they purchase access. Usually this would be "student" unless you have a special reason for choosing another role. As for other default settings, it may be overridden in individual courses.


#Login go to your PayPal account, select "My Account" tab, then Profile tab.
Tip: If you wish to allow users to create their own accounts on your site then you need to set up [[Email-based_self-registration|Email based self registration]].
#Click on "Language Encoding" in the right column Selling Preferences.
#Click on "More Options" button and select UTF-8 encoding for both cases. If you are using other software with IPN please check that it is compatible with UTF-8 encoding.


==See also==
==Course settings for PayPal==


* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=137299 Can't get paid enrollment to work in any form] forum discussion
===Checking you have PayPal in your course===
*[[Metacourses]] - using same core course subjects but packaging them at different rates.


[[Category:Enrolment]]
# If you are using the [[Boost theme]], click the gear menu from the Participants link and then click Enrolment methods. If you are using a different theme, go to ''Course administration > Users > Enrolment methods''
[[fr:Inscription par Paypal]]
# If you do not see PayPal, use the pull down menu "Add method" and select PayPal
# Make sure PayPal has its "eye" opened:
 
[[File:Paypalenrolmentmethod.png]]
{{Note|Make sure you don't  have [[Self enrolment]] enabled as this would allow users to access the course without paying. If you do need some users to self enrol for free, then add an [[Enrolment key]] in the self enrolment settings.}}
 
===Setting a price for your course===
 
# In ''Course Administration > Users > Enrolment methods'', click the edit/hand/pen icon to the right of the PayPal option.
# Optional: Give a name to this enrolment method if you wish in "Custom Instance name"
# Ensure that "Allow PayPal enrolments" is set to "yes"
# In "Enrol cost", type in the cost of your course and in "Currency" choose your currency.
# Usually you would leave the "Assign role" as "student" unless you have a very special reason for allowing your users to enrol as, say, editing teachers etc
# Choose an enrolment period and/or start/end dates if desired.
# Click the "Save changes" button.
 
[[File:Paypalcoursesettings.png]]
 
===What the new user sees===
 
When a new user clicks on your course link, they will see a message inviting them to go to PayPal to purchase access to the course. In the list of courses, PayPal courses have a dollar sign icon next to them.
{|
| [[File:Paypaluserview.png|frame|left|Message inviting user to pay via PayPal]]
| [[File:Paypalicon.png|frame|left|PayPal course listed with dollar sign icon]]
|}
 
==Changing the dollar symbol==
[[File:PaypalGBP.png|frame|PayPal course listed with GBP sign icon]]
The default currency symbol for PayPal is a dollar sign. If you are using GBP or Euros or another currency, you can change this by creating your own customised icon with your choice of currency. Make it 16x 16 pixels and call it ''icon.gif''  Upload your new icon via FTP to your  ''moodle directory>enrol>paypal>pix''. Your icon.gif will override the dollar sign. Make sure you refresh your page to be sure of the changes.
 
==PayPal capabilities==
 
*[[Capabilities/enrol/paypal:config|Configure PayPal enrol instances]]
*[[Capabilities/enrol/paypal:manage|Manage enrolled users]]
*[[Capabilities/enrol/paypal:unenrol|Unenrol users from course]]
*[[Capabilities/enrol/paypal:unenrolself|Unenrol self from the course]]
 
== See also ==
*[http://moodle.org/mod/forum/discuss.php?d=171745#p977221 Testing the PayPal plugin in the PayPal Sandbox]
 
[[de:Paypal-Einschreibung]]
[[es:Inscripción por Paypal]]
[[fr:Inscription Paypal]]

Latest revision as of 08:10, 20 June 2017

The PayPal enrolment plugin allows users to pay for courses and then be automatically enrolled.

PayPal account creation

  1. Go to https://www.paypal.com and create a PayPal account. Not required but recommended for selling: Upgrade your account to "Premier" status and get "Verified".
  2. Set the Encoding to UFT-8. In Paypal, go to Profile > Language Encoding (under the Selling Preferences column) and set your website's language (like select "Western European Languages (including English)" as it is the only English version). Then click on the "More Options" button and set the Encoding to "UTF-8", select "Yes" to use the same encoding for data sent from PayPal to you, and save.
  3. Optionally setup IPN in PayPal to interact with Moodle. Log into PayPal, go to "Profile > Instant Payment Notifications (IPN)”, click "Turn On IPN", click the "Edit settings" and enter a URL that references your IPN file in your Moodle installation (for example: http://<domain name>/moodle/enrol/paypal/ipn.php).

Enabling PayPal enrolment

An administrator can enable PayPal file enrolment as follows:

  1. Go to Site administration > Plugins > Enrolments > Manage enrol plugins and click the eye icon opposite PayPal. When enabled, it will no longer be greyed out. Manual enrolment must also be enabled, since the PayPal plugin requires it.
  2. Click the settings link, configure as required (see details of settings below), then click the 'Save changes' button.
  • PayPal business email - This setting is case sensitive and must exactly match that in PayPal
  • Default role assignment - This means the role that a new user will automatically be given in a course when they purchase access. Usually this would be "student" unless you have a special reason for choosing another role. As for other default settings, it may be overridden in individual courses.

Tip: If you wish to allow users to create their own accounts on your site then you need to set up Email based self registration.

Course settings for PayPal

Checking you have PayPal in your course

  1. If you are using the Boost theme, click the gear menu from the Participants link and then click Enrolment methods. If you are using a different theme, go to Course administration > Users > Enrolment methods
  2. If you do not see PayPal, use the pull down menu "Add method" and select PayPal
  3. Make sure PayPal has its "eye" opened:

Paypalenrolmentmethod.png

Note: Make sure you don't have Self enrolment enabled as this would allow users to access the course without paying. If you do need some users to self enrol for free, then add an Enrolment key in the self enrolment settings.


Setting a price for your course

  1. In Course Administration > Users > Enrolment methods, click the edit/hand/pen icon to the right of the PayPal option.
  2. Optional: Give a name to this enrolment method if you wish in "Custom Instance name"
  3. Ensure that "Allow PayPal enrolments" is set to "yes"
  4. In "Enrol cost", type in the cost of your course and in "Currency" choose your currency.
  5. Usually you would leave the "Assign role" as "student" unless you have a very special reason for allowing your users to enrol as, say, editing teachers etc
  6. Choose an enrolment period and/or start/end dates if desired.
  7. Click the "Save changes" button.

Paypalcoursesettings.png

What the new user sees

When a new user clicks on your course link, they will see a message inviting them to go to PayPal to purchase access to the course. In the list of courses, PayPal courses have a dollar sign icon next to them.

Message inviting user to pay via PayPal
PayPal course listed with dollar sign icon

Changing the dollar symbol

PayPal course listed with GBP sign icon

The default currency symbol for PayPal is a dollar sign. If you are using GBP or Euros or another currency, you can change this by creating your own customised icon with your choice of currency. Make it 16x 16 pixels and call it icon.gif Upload your new icon via FTP to your moodle directory>enrol>paypal>pix. Your icon.gif will override the dollar sign. Make sure you refresh your page to be sure of the changes.

PayPal capabilities

See also