PayPal enrolment: Difference between revisions

From MoodleDocs
m (→‎PayPal account creation: Update the instructions for setting up the PayPal)
(paypal screencast)
 
(3 intermediate revisions by 2 users not shown)
Line 20: Line 20:


==Enabling PayPal enrolment==
==Enabling PayPal enrolment==
{{MediaPlayer | url = https://youtu.be/vBfnNZDjR0c | desc = How to set up payment for courses}}


An administrator can enable PayPal file enrolment as follows:
An administrator can enable PayPal file enrolment as follows:
Line 36: Line 38:


# 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''
# 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''
# If you do not see PayPal, use the pull down menu "Add method" and select PayPal
# If you do not see PayPal, use the pull down menu "Add method" and select PayPal. If you are a course teacher, your admin will need to allow you the capability ''enrol/paypal:config'' in order for you to add this method.
# Make sure PayPal has its "eye" opened:  
# Make sure PayPal has its "eye" opened:  


Line 56: Line 58:
===What the new user sees===
===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.
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 "P" icon next to them.
{|
{|
| [[File:Paypaluserview.png|frame|left|Message inviting user to pay via PayPal]]
| [[File:Paypaluserview.png|frame|left|Message inviting user to pay via PayPal]]
| [[File:Paypalicon.png|frame|left|PayPal course listed with dollar sign icon]]
| [[File:Paypalicon.png|frame|left|PayPal course listed with "P" 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==
==PayPal capabilities==

Latest revision as of 10:40, 30 October 2018

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

PayPal side setup

  1. Create a PayPal account at https://www.paypal.com
    • Although not required, it may be wise to upgrade your account to "Premier" status and get "Verified".
  2. Set the encoding to UFT-8.
    • Go to Profile > Profile and settings > My selling tools > More selling tools > PayPal button language encoding
    • Make sure you have your website's language set to Western European Languages
    • Click the "More Options" button
    • Set encoding to "UTF-8" and let the same encoding be used for IPN, too.
  3. Enable instant payment notifications (IPN)
    • Go to Profile > Profile and settings > My selling tools > Getting paid and managing my risk > Instant payment notifications > Update
    • Turn IPN on and set the notification URL to your site's enrol/paypal/ipn.php (so it reads for example like https://my.school.edu/moodle/enrol/paypal/ipn.php).

You may wish to log in to https://developer.paypal.com/developer/accounts/ and experiment with PayPal Sandbox first. If doing do, put this to your config.php:

   $CFG->usepaypalsandbox = 1;

Enabling PayPal enrolment

How to set up payment for courses

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. If you are a course teacher, your admin will need to allow you the capability enrol/paypal:config in order for you to add this method.
  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 "P" icon next to them.

Message inviting user to pay via PayPal
PayPal course listed with "P" icon

PayPal capabilities

See also