How do I integrate PayFast with CS-Cart?

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:

  1. Download the payment module.
  2. Unzip the module to a temporary location on your computer.
  3. Copy the app and design folders in the archive to your base CSCart folder.
    • 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 in to your Database Management System of choice and run the install.sql file.
  5. Log in to the admin section of your CSCart installation.
  6. Navigate to Administration > Payment Methods.
  7. Click Add Payment.
  8. Input a Name > PayFast, select Template > ‘cc_outside.tpl’, select Processor > PayFast, select Icon > Url and input https://www.payfast.co.za/images/logo.png, complete the form accordingly and click Create.
  9. Once the payment method is created, click Edit.
  10. Click Configure, select the sandbox mode and click Save.
  11. The module is now ready to be tested with the 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 are as follows:

CS-Cart V4

app/payments/payfast.php app/payments/payfast/payfast_common.inc design/backend/templates/views/payments/components/cc_processors/admin_payfast.tpl

Testing that it is working correctly

If you followed the installation instructions above, the module is in ‘test’ mode and you can test it by purchasing from your site as a buyer normally would. You will be redirected to PayFast for payment and can log in with the user account detailed above and make payment using the balance in their wallet.

You will not be able to directly ‘test’ a credit card or Instant EFT payment in the sandbox, but you don’t really need to. The inputs to and outputs from PayFast are exactly the same, no matter which payment method is used, so using the wallet of the test user will give you exactly the same results as if you had used another payment method.

Going live

In order to make the module ‘live’, do the following:

  1. Log in to the admin section of your CSCart system.
  2. Navigate to Administration > Payment Methods.
  3. Under PayFast, click Edit.
  4. In the Configure section, use the following settings:  
  5. Click Save.

    • Related Articles

    • How do I integrate PayFast with VP-CART?

      This module was developed by VP-CART, so please visit their website for integration support. You will need to be registered on PayFast to accept payments and get your Merchant ID. Installation Instructions For installation, you can find the full ...
    • 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 ...
    • How do I integrate PayFast with Shopping Cart Elite?

      This module was developed by Shopping Cart Elite, so please visit their website for integration support. You will need to be registered on PayFast to accept payments and get your Merchant ID.
    • Does Payfast integrate with a Wix website?

      Unfortunately at this time Payfast doesn’t integrate directly with Wix, but there are ways around this. If you need a shopping cart system on your Wix website you can use Ecwid. Ecwid provides shopping cart functionality to platforms like WordPress, ...
    • How do I integrate Payfast with WooCommerce?

      Please find the below steps for the WooCommerce integration with Payfast. Find your Payfast Merchant Details Log in to - Payfast dashboard > Settings > Developer Settings. Copy your Merchant ID and Merchant Key (top right) to use during the setup of ...