This is an exploratory test of a new feature, so please feel free to try anything you like and not just the test steps!
This test requires admin access. If you would like to use the QA testing site for running it, please see the QA testing guide for details of how to request admin access. Begin just after the hourly reset to give yourself plenty of time to complete the test!
- A PayPal developer account and sandbox accounts (at least 1 business and 1 personal account). For more information, see https://developer.paypal.com/developer/accounts/
- A sandbox Merchant App (you can create Apps at https://developer.paypal.com/developer/applications). Click on your App name to get a Client ID and Secret. You will need them for the test.
- Log in as an administrator and enable PayPal gateway in "Site administration > Plugins > Payment gateway > Manage payment gateways" (it is enabled by default).
- Create a Payment account via "Site administration > Payments > Payment accounts".
- Configure the PayPal gateway clicking "PayPal" under "Payment gateways column". Use the Client ID and Secret you have for your Sandbox App in PayPal. Make sure to set the environment to "Sandbox" and check "Enable".
- Visit "Site administration > Plugins > Enrolments > Manage enrol plugins" and enable the "Enrolment on payment" plugin
- Go to a course 'Enrolment methods' via the gear menu or the Administration block
- Add Enrolment on payment as an enrolment method and set "Enrol cost" to $10
- Log in as a student and attempt to enrol in the course
- Click on Select payment type button, select PayPal as the payment method, and then proceed with the payment on PayPal using a sandbox personal account
- Verify that you are enrolled in the course after you proceed with the payment.