Start a conversation

How do I integrate PayFast with Magento?

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

Due to security updates, it is not recommended to use version 1.9 or below, and unfortunately, PayFast no longer supports these versions.

Installation requirements

  • A working Magento 2.0 or 2.1-2.2* or 2.3 installation

Installing and testing 

  1. Setup ZAR on your Magento site. In the admin panel navigate to ‘Stores’, and add ZAR under currency Symbols and Rates.
  2. Download the PayFast module for Magento 2.0 or Magento 2.1-2.2* or Magento 2.3.
  3. Copy the PayFast app folder to your root Magento folder. This will not overwrite any files on your system.
  4. You will now need to run the following commands in the given order:
    • php ./bin/magento module:enable Payfast_Payfast
    • php ./bin/magento setup:di:compile
    • php ./bin/magento setup:static-content:deploy
    • php ./bin/magento cache:clean
  5. Log into the admin panel and navigate to Stores > Configuration > Sales > Payment Method’ and click 'PayFast'.
  6. Enable the module, as well as debugging. To test in sandbox insert ‘test’ in the ‘server’ field and use the following credentials: Merchant ID: 10000100 Merchant Key: 46f0cd694581a Leave the passphrase blank and setup the other options as required
  7. Click ‘Save Config’, you are now ready to test in sandbox, click ‘Save Config’.
  8. Once you are ready to go live, insert ‘live’ into the ‘server’ field and input your PayFast credentials. Set debug log to ‘No’, and the other options as required.
  9. Click ‘Save Config’, you are now ready to process live transactions via PayFast.
Choose files or drag and drop files