Start a conversation

How do I integrate PayFast with osCommerce?

In order to use PayFast with osCommerce, you will need to install the PayFast payment module for osCommerce which is provided by PayFast.

Installation requirements

  • A working osCommerce installation

Installation and testing

To install the PayFast Website Payments payment module, please follow the instructions below:

  1. Download the payment module from our site.
  2. Unzip the module to a temporary location on your computer.
  3. Copy and paste the files into your osCommerce installation as they were extracted.
    • This should NOT overwrite any existing files or folders and merely supplement them with the PayFast files.
    • This is, however, dependent on the FTPprogram you use.
    • If you are concerned about this, rather copy the individual files across as per instructions below.
  4. Log into the osCommerce admin console.
  5. Navigate to Modules ? Payment
  6. Click the 'Install Module' button on the right-hand side.
  7. Select 'PayFast' from the list.
  8. Click the 'Install Module' button.
  9. Click the 'Edit' button on the right-hand pane.
  10. Change the value for 'Enable PayFast' to 'True'.
  11. Scroll down to the bottom of the right-hand pane and click the 'Save' button.
  12. The module is now operating in 'test mode' and is ready to be tested with the PayFast Sandbox. To test with the sandbox, use the following login credentials when redirected to the PayFast site:
    • Username: sbtu01@payfast.co.za
    • Password: clientpass

Copying the individual files across

If you are concerned that copying the entire folder from the downloaded module may overwrite files in your installation, rather copy the files from the extracted module individually into your installation.

Be sure to copy the files from the downloaded module to their corresponding locations within your installation:

The list of files needed in your online installation is as follows:

catalog/ext/modules/payment/payfast/payfast.php
catalog/includes/languages/english/modules/payment/payfast.php
catalog/includes/modules/payment/payfast.php

Going live

In order to make the module “Live”, follow the instructions below:

  1. Log into the osCommerce admin console.
  2. Using the main menu, navigate to Modules ? Payment.
  3. Select the 'PayFast' payment method by clicking on it.
  4. Click the 'Edit' button on the right-hand pane.
  5. Update the configuration values as detailed below: 
    • Enable PayFast? = True
    • Merchant ID = https://www.payfast.co.za/acc/integration>
    • Merchant Key = https://www.payfast.co.za/acc/integration>
    • Transaction Server = “Live”
    • (Change the other fields as per your preferences)
  6. Scroll down to the bottom of the right-hand pane and click the “Save” button.

The module is now ready to receive live payments.

Choose files or drag and drop files
Helpful?
Yes
No