How do I integrate PayFast with osCommerce?

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, do the following:

  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 in to the osCommerce admin console.
  5. Navigate to Modules > Payment.
  6. Click Install Module on the right-hand side.
  7. Select PayFast from the list.
  8. Click Install Module button.
  9. Click Edit 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 Save.
  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:

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”, do the following:

  1. Log in to the osCommerce admin console.
  2. Using the main menu, navigate to Modules > Payment.
  3. Select the PayFast payment method.
  4. Click Edit on the right-hand pane.
  5. Update the configuration values as detailed below: 
  6. Scroll down to the bottom of the right-hand pane and click Save.

The module is now ready to receive live payments.


    • Related Articles

    • How do I integrate PayFast with UberCart?

      To integrate PayFast with UberCart, do the following: Download the PayFast module and extract the uc_payfast folder from the zip folder. Move or copy the folder called ”uc_payfast” into your /modules/ubercart/payment directory. Log in to the admin ...
    • How do I integrate PayFast with Events Manager Pro?

      You’ll need a working installation of WordPress with Events Manager Pro before you can integrate with PayFast. Kindly see their website for more information. To install the PayFast module, do the following: Download the PayFast plugin. Upload the ...
    • How do I integrate PayFast with Invoice Ninja?

      To integrate your PayFast account with Invoice Ninja, do the following:   Log in to your Invoice Ninja account. Navigate to Settings > Payment Settings. Click on Configure Gateways. Search for and select PayFast as the Provider. Enter your PayFast ...
    • How do I integrate PayFast with CS-Cart?

      You’ll need a working installation of CS-Cart before you can integrate with PayFast. Kindly see their website for more information. Installation and testing V4 To install the PayFast payment module, do the following: Download the payment module. ...
    • How do I integrate PayFast with Drupal Commerce?

      You’ll need a working installation of Drupal Commerce before you can integrate with PayFast. Kindly see their website for more information.  Integration steps for Drupal-7 Commerce: Requirements Drupal 7 (or commerce_kickstart) Commerce 7 ...