Open source eCommerce solution


Key Features

  • 7000 add-ons
  • Open-source
  • Been established for 12 years
  • Active community


See PayFast integration

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

What are the installation requirements?

  • A working osCommerce installation


How do I install the PayFast module?

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. Login to 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 press the “Save” button
  12. The module is now operating in “test mode” and is ready to be tested with the Sandbox. To test with the sandbox, use the following login credentials when redirected to the PayFast site:
    • Username: sbtu01@payfast.co.za
    • Password: clientpass

How do I copy 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 correspondinglocations within your installation:

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


How can I test that it is working correctly?

I”m ready to go live! What do I do?

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

  1. Login to 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 press the “Save” button

The module is now ready to receive live payments.

See Upgrading and FAQs


Standard Upgrade Procedure

  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
    • WARNING: This will overwrite the existing module
    • If you have made any modifications to the PayFast module, you should rather merge your changes into the new files

1.00 >> 1.10

  1. Remove old module
    • Navigate to PayFast module in Modules ? Payment in admin console
    • Save all necessary configuration information (Merchant ID, Merchant Key etc.)
    • Click “remove” to remove module
  2. Clean up old files
    • Delete ”/catalog/ext/modules/payment/payfast” directory in and both files in it
  3. Rename old status
    • Run the SQLstatement detailed below on your osCommerce database:
  4. Install new files
UPDATE `orders_status
 `SET `orders_status_name` = 'Preparing [PayFast]'
  WHERE `orders_status_name` = 'Awaiting Payment [PayFast]';

1.10 >> 1.11>

Follow the Standard Upgrade Procedure above.

1.11 >> 1.20

Follow the Standard Upgrade Procedure above.


Do I need to set the ITN url on my account?

The osCommerce module currently uses PDT and not ITN.

Notwithstanding this though, when using the one of our payment modules, the ITN url is set automatically and you do notneed to set it on your account manually.

Where is my “base osCommerce folder”?

This is the root of your osCommerce installation. Where this is, depends on what system you are using and where you are hosting.

The easiest way to find this though would be to look for the osCommerce directory structure.

The base (or root) osCommerce folder will look similar to the image shown below.

Simply find the folder in your installation which looks similar to this structure and that will be your “base osCommerce folder”.

Directory structure of base osCommerce folder

I get the error “Unable to find the socket transport ”ssl””!

The problem is that the PHPinstallation on your server does not have OpenSSL support enabled. This is required in order for your server to communicate securely with PayFast to receive payment information.

You can check this by creating a file called “phpinfo.php” in the root of your website with the following content:

1<!--?php <br-->echo phpinfo();<br>?>


Once you have done this, browse to the file in your browser. This will output information about your server”s PHPinstallation to the screen. There should be a section entitled “OpenSSL” with a value showing “OpenSSL support = enabled” (Similar to the image below). If you are experiencing this problem, this section will either not be there, or will be set to disabled.

OpenSSL Enabled

To correct this problem, your hosting provider will need to enable OpenSSL support within PHP.

Note:This has nothing to do with an SSLcertificate and you don’t need an SSLCertificate! If you’re hosting provider advises you that you do, they are incorrect and we advise that you ask to speak to someone technical regarding this and potentially direct them to this helpful resource as well. Failing this, we advise that you move to a different hosting provider.

To enable OpenSSL for PHP, please ask your hosting provider to consult PHPresources on how to achieve this or direct them to the following resources:

What is the payment flow?

PayFast works on browser redirection and will redirect the user to PayFast for payment after they click the “Continue” button on the Order Confirmation page.

Before the browser is redirected to PayFast, an order is created in osCommerce with the status “Preparing [PayFast]”. This is to ensure that you have a reference for payments in osCommerce in case anything goes wrong.

If the order is cancelled during processing on PayFast:

  • The existing order will be deleted from osCommerce
  • The user will be returned to the Payment Information page of checkout

If the order is successful during processing on PayFast:

  • The order status will be updated to “Pending” (or the status you specified when configuring the module)
  • The user will be directed to the “Checkout Success” page