CS-Cart

CS-Cart is a complete eCommerce shopping cart software solution with an open source code. It’s an online store on your own server and wherever you need it.

CS-Cart

Key Features

  • Unlimited products
  • Unlimited categories
  • Product management
  • Promotional coupons

Integration

You’ll need a working installation of CS-Cart before you can integrate with PayFast. Kindly see their website for more information.

See PayFast integration steps for CS-Cart v3

Installation and Testing CS-Cart V3

To install the PayFast payment module, follow the instructions below:

  1. Download the payment module from Github
  2. Unzip the module to a temporary location on your computer
  3. Copy the ‘payments’, ‘skins’ and ‘vars’ 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. Login to your Database Management System of choice and run the install.sql file
  5. Login to the admin section of your CSCart installation
  6. Navigate to the Administration ? Payment Methods page
  7. Click the ‘Add Payment’ button
  8. Input a Name?’PayFast’, select Template?’payfast.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 on it’s ‘Edit’ button.
  10. Click the ‘Configure’ button, the PayFast options will then be shown, select the payment status for ‘completed’ and ‘failed’ payments, 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:
    • Username: sbtu01@payfast.co.za
    • Password: clientpass
  12. Once you are ready to go live change the ‘sandbox/live mode to ‘live’ and insert your PayFast merchant ID and Key and click save
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 V3

payments/payfast.php
payments/payfast/payfast_common.inc
payments/payfast/payfast.png
payments/payfast/payfastlogo.gif
skins/basic/admin/views/payments/components/cc_processors/payfast.tpl
skins/basic/views/orders/components/payments/payfast.tpl
vars/skins_repository/basic/admin/views/payments/components/cc_processors/payfast.tpl

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 login 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 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.

See PayFast integration steps for CS-Cart v4

Installation and Testing V4

To install the PayFast payment module, follow the instructions below:

  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. Login to your Database Management System of choice and run the install.sql file
  5. Login to the admin section of your CSCart installation
  6. Navigate to the Administration ? Payment Methods page
  7. Click the ‘Add Payment’ button
  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 on it’s ‘Edit’ button.
  10. Click the ‘Configure’ button, 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:
    • 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 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

How can I test 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 login 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.

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 admin section of your CSCart system
  2. Navigate to the Administration ? Payment Methods page
  3. Under PayFast, click on the ‘Edit’ link
  4. In the Configure section, use the following settings:
  5. Click Save

See Upgrading and FAQs

Upgrading

Standard Upgrade Procedure

  1. Unzip the module to a temporary location on your computer
  2. Copy the ‘modules’ folder in the archive to your base ‘CSCart’ folder

Frequently Asked Questions (FAQs)

What is the payment flow?

PayFast works on browser redirection and will redirect the user to PayFast for payment after they click the ‘Confirm Order’ button on the Checkout page.

At this stage, the order has NOT been created in CSCart, but the shopping cart details will be used.

If the payment is CANCELLED during processing on PayFast:

  • The user will be returned to the ‘Shopping Cart’ page to either correct their shopping cart or to choose another payment gateway.

If the payment is SUCCESSFUL through PayFast:

  • The user will be returned to the ‘Order Confirmation’ page
  • The order will be created and will have a status of ‘Open’

Useful links