Start a conversation

How do I integrate PayFast with Zen Cart?

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

Installation requirements

  • A working Zen Cart installation

Installation and testing

To install the PayFast payment module, 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 Zen Cart 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 FTP program you use.
    • If you are concerned about this, rather copy the individual files across as per instructions below.
  4. Log into the Zen Cart admin console.
  5. Using the main menu, navigate to Modules ? Payment.
  6. Select the 'PayFast' payment method by clicking on it.
  7. Click the 'Install' button on the right-hand pane.
  8. Change the value for 'Enable PayFast' to 'True'.
  9. Scroll down to the bottom of the right-hand pane and click the 'Update' button.
  10. 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:

payfast_itn_handler.php
admin/payfast.php
admin/includes/boxes/extra_boxes/payfast_customers_dhtml.php
admin/includes/languages/english/payfast.php
includes/auto_loaders/payfast_itn.core.php
includes/init_includes/init_payfast_itn_postcfg.php
includes/init_includes/init_payfast_itn_sessions.php
includes/languages/english/modules/payment/payfast.php
includes/modules/payment/payfast.php
includes/modules/payment/payfast/payfast_functions.php
includes/modules/payment/payfast/payfast_common.inc

Going live

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

  1. Log into the Zen Cart 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 'Update' button.

The module is now ready to receive live payments.

Choose files or drag and drop files
Helpful?
Yes
No