How do I integrate PayFast with Moodle?

How do I integrate PayFast with Moodle?

To install the PayFast payment module, do the following:

  1. Download the PayFast Moodle enrolment plugin according to the version of Moodle you have installed: v3.1 – v3.8+ or v3.0.
  2. Unzip the file on your local drive and upload it to the publicly accessible Moodle installation, this should not overwrite any files on the website. [your moodle installation folder]/enroll/payfast
  3. Log in to your Moodle website as the admin. You will be presented with the Plugins Check screen, click Update Moodle database now and then Continue.
  4. Navigate to Site Administration > Plugins > Enrolments and select the link at the top of the Manage enrol plugins page.
  5. Enable PayFast by clicking the little Disabled icon.
  6. Again you will be presented with the Plugins Check screen, click Update Moodle database now and then Continue.
  7. You are now ready to insert your PayFast Merchant ID and Key (these can be found by logging into your PayFast account and clicking the Settings tab).
    1. Change the settings further to suit your needs.
    2. It’s always advisable to do a test transaction in the Sandbox/Test site first.
    3. Change Allow PayFast Enrolments to Yes.
  8. Click Save.

To add PayFast as the payment method on a course, do the following:

  1. Navigate from Site Home (if applicable), and select the course name.
  2. Select the settings icon (top-right), then select More.
  3. On the Course administration page, select the Users tab, and navigate to Enrolment methods.
  4. Add PayFast as a method and set accordingly for the course.