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, do the following:
- Download the payment module from our site.
- Unzip the module to a temporary location on your computer.
- 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.
- Log in to the Zen Cart admin console.
- Using the main menu, navigate to Modules > Payment.
- Select the PayFast payment method.
- Click Install on the right-hand pane.
- Change the value for Enable PayFast to True.
- Scroll down to the bottom of the right-hand pane and click Update.
- 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:
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', do the following:
- Log in to the Zen Cart admin console.
- Using the main menu, navigate to Modules > Payment.
- Select the PayFast payment method.
- Click Edit on the right-hand pane.
- Update the configuration values as detailed below:
- Scroll down to the bottom of the right-hand pane and click Update.
The module is now ready to receive live payments.