PrestaShop

Open source eCommerce solution

PrestaShop

Key Features

  • Supports physical goods and digital downloads
  • Powerful navigation
  • Search engine friendly
  • Stock management

Integration

See PayFast integration (hosted PrestaShop website)

How do I use PayFast with PrestaShop?

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

How do I install the PayFast module?

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 the “modules” folder in the archive to your base “PrestaShop” 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
    • Using your FTP program, ensure that the /modules as well as /modules/payfast directories are set to CHMOD 0755, otherwise the validation script will not be accessible to set successful payments as paid.
  4. Login to the PrestaShop Back Office console
  5. Using the top navigation bar, navigate to Modules
  6. Click on Payments & Gateways to expand the options
  7. Click on the “Install” button to install the module
  8. Once the module is installed, click on “Configure” below the PayFast name.
  9. The PayFast options will then be shown, and you will see the module is ready to be tested.
  10. Leave everything as per default 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 correspondinglocations within your installation:

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

modules/payfast/config.xml
modules/payfast/logo.gif
modules/payfast/payfast.log
modules/payfast/payfast.php
modules/payfast/payfast.png
modules/payfast/payfast_common.inc
modules/payfast/payfast_payment.tpl
modules/payfast/payfast_success.tpl
modules/payfast/validation.php

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 PrestaShop Back Office
  2. Using the top navigation bar, navigate to Modules
  3. Click on Payments & Gateways to expand the options
  4. Under PayFast, click on the “Configure” link
  5. In the PayFast Settings block, use the following settings:
    • Mode = “Live”
    • Merchant ID = <Login to PayFast -> Integration Page>
    • Merchant Key = <Login to PayFast -> Integration Page>
    • Debugging = Unchecked
  6. Click Save

See PayFast integration (PrestaShop cloud)

How do I install the PayFast module?

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

  1. Download the PayFast addon from the PrestaShop addons site
  2. Navigate to modules in the admin dashboard of your PrestaShop cloud site
  3. Click on ‘Add New Module’ in the top right corner of the screen and follow the prompts
  4. Select the PayFast addon downloaded in step 1 for upload
    • If you are not able to select a file for upload you may need to logout of the PrestaShop addons site (navigate to your profile, select ‘Preferences’ and then ‘Log out of addon account’), then repeat the installation process from step 2
  5. Click on the “Install” button to install the module
  6. Once the module is installed, click on “Configure” below the PayFast name.
  7. The PayFast options will then be shown, and you will see the module is ready to be tested.
  8. Leave everything as per default and click “Save” in order to test in sandbox mode

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 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 PrestaShop Back Office
  2. Using the top navigation bar, navigate to Modules
  3. Click on Payments & Gateways to expand the options
  4. Under PayFast, click on the “Configure” link
  5. In the PayFast Settings block, use the following settings:
    • Mode = “Live”
    • Merchant ID = <Login to PayFast -> Integration Page>
    • Merchant Key = <Login to PayFast -> Integration Page>
    • Debugging = Unchecked
  6. Click Save

See Upgrading and FAQs

UPGRADING

Standard Upgrade Procedure

  1. Download the payment module from our site
  2. Unzip the module to a temporary location on your computer
  3. Copy the “modules” folder in the archive to your base “PrestaShop” folder

FREQUENTLY ASKED QUESTIONS (FAQS)

Why isn’t my cart being redirected to PayFast?

Often when the friendly URL’s function is enabled on the prestashop installation some clients reported that the PayFast plugin was broken. The fix for this is to make sure that the permissions on the payfast module and it’s sub-directories and files is CHMOD 0755 or more secure, 0644. If it is 0777 the prestashop installation wont see the module and reports an error 404, page not found.

Why isn’t my payments being marked as paid after a successful transaction?

It could be that the CHMOD settings for your /modules directory is incorrect, ensure that both /modules and /modules/payfast both are CHMOD 0755, if it is 0777 the prestashop installation wont see the module and reports an error 404, page not found, or, throws an internal server error.

What is the payment flow?

PayFast works on browser redirection and will redirect the user to PayFast for payment after they click the “Make Payment” button on the Checkout page.

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

If the payment is CANCELLED during processing on PayFast:

  • The user will be returned to the “Order” 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 “Payment Accepted”

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

No. When using the one of our payment modules, the ITN url is set automatically and you do not need to set it on your account manually.

Where is my “base PrestaShop folder”?

This is the root of your PrestaShop 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 PrestaShop directory structure.

The base (or root) PrestaShop 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 PrestaShop folder”.

Directory structure of base PrestaShop folder

I upgraded PrestaShop and now “PayFast” no longer appears as a payment option!

When upgrading PrestaShop, the PayFast payment module files may be deleted.

You simply need to reinstall the module following the installation procedures above and the “PayFast” option will reappear with your previous setting intact.

I can not upload an addon on my PresatShop cloud website

You will need to register an addon account with PrestaShop in order to download the module. After clicking on ‘Add New Module’ if you are unable to upload the PayFast module you will need to log out of your addons account (navigate to your profile, select ‘Preferences’ and then ‘Log out of addon account’), and then attempt to upload the module again.

USEFUL LINKS


 

Register your free account