-
Functional Test
-
Minor
-
Moodle 3.6
Prerequisites:
- A Moodle installation that is visible on the internet.
- A PayPal developer account and sandbox accounts (at least 1 facilitator/business and 1 buyer account). For more information, see https://developer.paypal.com/developer/accounts/
- Optional: Set up Moodle SMTP settings.
- Set $CFG->usepaypalsandbox = true; in your config.php to use sandbox account for testing.
Test
- Log in as an administrator and enable PayPal enrolment via 'Manage enrol plugins' in the Site administration.
- In the PayPal enrolment settings, set "Paypal business email" to PayPal facilitator sandbox account.
- Go to a course (c1) and go to 'Enrolment methods' via the gear menu or the Administration block (depending upon your theme).
- Add PayPal as an enrolment method and set "Enrol cost" to 1
- Log in as a student and attempt to enrol in the course by clicking the "Send payment via PayPal" button
- Confirm payment and click on the link to go back to your Moodle site.
- Verify that you are enrolled in the course
- Log in as an administrator again and backup the course
- Restore it as a new course and verify that it has PayPal as an enrolment method.