Note: You are currently viewing documentation for Moodle 2.5. Up-to-date documentation for the latest stable version of Moodle may be available here: Paypal enrolment.

Paypal enrolment: Difference between revisions

From MoodleDocs
(starting to update this page)
m (corrected spelling)
 
(23 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Update}}
{{Enrolment}}
{{Enrolment}}
Location: PayPal edit settings link in ''Site administration > Plugins > Enrolments > Manage enrol plugins''
Location: PayPal edit settings link in ''Site administration > Plugins > Enrolments > Manage enrol plugins''


The PayPal enrolment plugin allows you to set up paid courses. The plugin has to be enabled by the site administrator (see Enrolment plugins)and then added to the course by an administrator or manager. You can then set an individual price for your course if needed.
The PayPal enrolment plugin allows you to set up paid courses. The plugin has to be enabled by the site administrator (see [[Enrolment_plugins|Enrolment plugins]])and then added to the course by an administrator or manager. You can then set an individual price for your course if needed.


==Course settings for Paypal==
==Course settings for Paypal==
===Checking you have Paypal in your course===
===Checking you have Paypal in your course===
*In a course, go to Settings>users>enrolment methods  
*In a course, go to Administration> Course administration>Users>Enrolment methods  
*If you do not see PayPal, use the pull down menu "Add method" and select PayPal.
 
*Make sure PayPal has its "eye" opened:  
*Make sure PayPal has its "eye" opened:  


[[File:Paypalenrolmentmethod.png]]
[[File:Paypalenrolmentmethod.png]]


===Setting a price for your course===
*In Administration>Course Administration>Users>enrolment methods, click the edit/hand/pen icon to the right of the Paypal option.
*Give a name to this enrolment method if you wish in "Custom Instance name". (You don't have to!)
*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.
{{New features}}Note: In Moodle 2.5 onwards, all Paypal-supported currencies are available.
*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.


==Setup Steps: Moodle Course Enrollment & Paypal==
[[File:Paypalcoursesettings.png]]
The following steps are based on '''Moodle release = '1.9.5+''' (Build: 20091007) and Paypal as of Feb 2011.
 
'''In Moodle:'''
* Create a course
* After the course is complete, from the main Moodle page (after logging in as an Administrator) click on the course name and then click on "Settings" on the left navigation bar.  In the new page that appears, do the following:
# Scroll down to the "Enrolments" section  and fill it out:
## Enrolment Plugins: Paypal
## Default role: Site Default (Student)
## Course enrollable: Yes
## Enrolment duration: 30 days (or whatever you want)
# "Enrolment expiry notification" section (these settings are optional but it is always good to communicate):
## Notify: Yes
## Notify students: Yes
## Threshold: 10 days
# "Availability" section
## Availability: "This course is available to students"
## Enrolment key: <left blank>  (not required; optional)
## Guest access: "Do not allow guests in"
## Cost: enter a price (like 100.00) and select currency (like "US Dollar")
# Save changes


* Now on the main Moodle page after logging in, it should list your course with a price under it.
===What the new user sees===
*When a new user clicks on your course link, having made a login to your Moodle, they will see the following screen, inviting them to go to PayPal to purchase access to your course:


Setup email based self-registration
[[File:Paypaluserview.png]]
* Log into Moodle as the Administrator
* Select "Site Administration > Users > Authentication > Manage Authentication"
# Enable "Email-based self-registration" (make sure the eye appears next to this)
# Scroll down and fill in the rest of the fields
## Self registration: "Email-based self-registration"
## Guest login button: Hide
## Restrict domains when changing email: checked
## Fill in ReCAPTCHA keys (go to http://recaptcha.net and fill out the form to create an account; it will then provide you with the public key and the private key to use on this form)
## All other fields are blank
## Save Changes


* Now select "Site Administration > Users > Authentication > Email-based self-registration"
==Admin settings==
# "Enable reCAPTCHA element": Yes
# All other fields: Unlocked


* Now select "Site Administration > Courses > Enrolments"
#If you wish to allow users to make their own accounts on your site then set up [[Email-based_self-registration|Email based self registration]]
# PayPal enabled, set to Default
#Go to ''Administration>Site Administration>Plugins>Enrolments>Manage enrol plugins'' and enable (open the "eye" of Paypal)
# "Send course welcome message": Yes
#Click the blue Settings link to the right of the PayPal enrolment link. Here are the default settings and default settings for new instances in a course:
# PayPal Edit button:
##Add the email of your Business PayPal account. The email settings are case sensitive and must exactly match that in PayPal.
## Provide an enrolment cost (this is a global cost, individual course costs defined in the step above will override this setting), currency and your personal/business email
##Choose whether to notify students/teachers/admin.
## Check all the checkboxes so that emails are sent
##Choose whether (or not) to allow the Paypal enrolment plugin by default in new courses
## Save changes
##Choose a default cost and currency. (This may  be overridden in individual courses)
##Choose a 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.) This may be overridden in individual courses.
##Choose the default enrolment period. This may be overridden in individual courses.


'''In Paypal:'''
==What to set up in Paypal==
* Setup your PayPal account at paypal.com
* Setup your PayPal account at paypal.com
# Create a Paypal account
# Create a Paypal account
# Not required but recommended for selling: Upgrade your account to "Premier" status and get "Verified"
# Not required but recommended for selling: Upgrade your account to "Premier" status and get "Verified"
# 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)
# 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 Paypay to you, and save.
# 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 Paypay 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: http://<domain name>/moodle/enrol/paypal/ipn.php)


* Do not use a PayPal button on your website
==What the user sees==
# Instead, on your website provide a link to your main login page for your Moodle installation.  It will now have a section on the right for 'firt time users' with a "Create new account" button. This is how the process will start now.
*If you have allowed users to create their own accounts then when they click to login, they will be presented with a screen'' Is this your first time here?'' It will give them instructions for making an account (which may be customised in the authentication common settings in ''Administration > Site administration > Plugins > Authentication > Manage authentication'') and once their account is confirmed via email they can click on a course which can be purchased and pay for it via Paypal. PayPal courses will have a dollar sign icon next to them:


'''Workflow -''' Now the workflow goes like this:
[[File:Paypalicon.png]]
* On your website links to the main login page for Moodle (looks something like: http://<domain name>/moodle/login/index.php)
* Click the "Create new account" button
# Fill in the form (this is the "Email-based self-registration" form with the reCAPTCHA at the bottom) and click the "Create my new account" button
# You will get a web page saying to check your email for instructions on completing your registration.
* Log into your email and you should have an email.  It will have a URL to click in order to confirm the new account.  Click it.
* A new Moodle page will appear saying "Thanks, <name>" "Your registration has been confirmed"
# Click the "courses" button


* Now it lists all the courses available.  When you click on one of the course names that you want to take, it brings you to a page that has the course summary and the price displayed.  Below this is another section that says "This course requires a payment for entry", shows the price and now has a PayPal button that says "Send payment via PayPal".  Clicking this sends you to PayPal with the course listed in the order summary and you can log in to pay. 
*Once payment is made both the user/student and the teacher/admin should have received emails from Paypal confirming the purchase.
# Once done paying you will receive an email confirmation and a link to the main Moodle login page that you provided in the Paypal setup.
# The user should be able to log in now to take the purchased course.
# Likewise you will have received emails from Paypal on the purchase and the user/student will have received a confirmation receipt from Paypal also.


==Changing the dollar symbol==
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.


==Course costs==
[[File:PaypalGBP.png]]
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.
==Paypal capabilities==


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.
*[[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]]


==Verifying the default encoding==
[[fr:Inscription par Paypal]]
[[de:Paypal-Einschreibung]]


You need to verify the default encoding in your PayPal business account as follows:


#Login go to your PayPal account, select "My Account" tab, then Profile tab.
== See Also ==
#Click on "Language Encoding" in the right column Selling Preferences.
*[http://moodle.org/mod/forum/discuss.php?d=171745#p977221 Testing the PayPal plugin in the PayPal Sandbox]
#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==
 
* Using Moodle [http://moodle.org/mod/forum/view.php?id=2981 Enrolment Plugins forum]
* Using Moodle [http://moodle.org/mod/forum/discuss.php?d=137299 Can't get paid enrollment to work in any form] forum discussion
*[[Metacourses]] - using same core course subjects but packaging them at different rates.
* see Jhon Anderson's  answer in the forums [http://moodle.org/mod/forum/discuss.php?d=116279#p510221 Howto setup Moodle to work with Paypal]
 
[[fr:Inscription par Paypal]]

Latest revision as of 21:16, 4 September 2013

Location: PayPal edit settings link in Site administration > Plugins > Enrolments > Manage enrol plugins

The PayPal enrolment plugin allows you to set up paid courses. The plugin has to be enabled by the site administrator (see Enrolment plugins)and then added to the course by an administrator or manager. You can then set an individual price for your course if needed.

Course settings for Paypal

Checking you have Paypal in your course

  • In a course, go to Administration> Course administration>Users>Enrolment methods
  • If you do not see PayPal, use the pull down menu "Add method" and select PayPal.
  • Make sure PayPal has its "eye" opened:

Paypalenrolmentmethod.png

Setting a price for your course

  • In Administration>Course Administration>Users>enrolment methods, click the edit/hand/pen icon to the right of the Paypal option.
  • Give a name to this enrolment method if you wish in "Custom Instance name". (You don't have to!)
  • 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.

New feature
in Moodle 2.5!
Note: In Moodle 2.5 onwards, all Paypal-supported currencies are available.

  • 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.

Paypalcoursesettings.png

What the new user sees

  • When a new user clicks on your course link, having made a login to your Moodle, they will see the following screen, inviting them to go to PayPal to purchase access to your course:

Paypaluserview.png

Admin settings

  1. If you wish to allow users to make their own accounts on your site then set up Email based self registration
  2. Go to Administration>Site Administration>Plugins>Enrolments>Manage enrol plugins and enable (open the "eye" of Paypal)
  3. Click the blue Settings link to the right of the PayPal enrolment link. Here are the default settings and default settings for new instances in a course:
    1. Add the email of your Business PayPal account. The email settings are case sensitive and must exactly match that in PayPal.
    2. Choose whether to notify students/teachers/admin.
    3. Choose whether (or not) to allow the Paypal enrolment plugin by default in new courses
    4. Choose a default cost and currency. (This may be overridden in individual courses)
    5. Choose a 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.) This may be overridden in individual courses.
    6. Choose the default enrolment period. This may be overridden in individual courses.

What to set up in Paypal

  • Setup your PayPal account at paypal.com
  1. Create a Paypal account
  2. Not required but recommended for selling: Upgrade your account to "Premier" status and get "Verified"
  3. 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 Paypay to you, and save.
  4. 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)

What the user sees

  • If you have allowed users to create their own accounts then when they click to login, they will be presented with a screen Is this your first time here? It will give them instructions for making an account (which may be customised in the authentication common settings in Administration > Site administration > Plugins > Authentication > Manage authentication) and once their account is confirmed via email they can click on a course which can be purchased and pay for it via Paypal. PayPal courses will have a dollar sign icon next to them:

Paypalicon.png

  • Once payment is made both the user/student and the teacher/admin should have received emails from Paypal confirming the purchase.

Changing the dollar symbol

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.

PaypalGBP.png

Paypal capabilities


See Also