Magento

An eCommerce platform used by some the world’s largest brands.

Magento

Key Features

  • Search Engine Optimisation
  • Powerful search capabilities
  • Scalable
  • Gift cards, store credit, reward points
  • Single license for multiple stores

Integration

See PayFast integration for Magento 1.9

How do I use PayFast with Magento 1.9?

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

What are the installation requirements?

  • A working Magento installation

INSTALLATION AND TESTING

How do I install the PayFast module?

Using Magento Connect

To install the PayFast payment module using the Magento Connect service, follow the instructions below:

  1. Login to the Magento Administrator console
  2. Using the main menu, navigate to System ? Magento Connect ? Magento Connect Manager
  3. Enter the following in the “Paste extension key to install” field (if it doesn”t work try the other one):
    • Magento Connect v1.x
      magento-community/PayFast
    • Magento Connect v2.x
      http://connect20.magentocommerce.com/community/PayFast
  4. Click Install
  5. Once installation has completed, click the “Return to Admin” link
  6. (Continued at “Common” below)

Direct from PayFast

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

  1. Download the Magento payment module from GitHub
  2. Unzip the module to a temporary location on your computer
  3. Copy the “app” folder from the archive to your base “magento” folder (using FTPprogram or similar)
    • This should NOT overwrite any existing files or folders and merely supplement them with the PayFast files
    • This is however, dependent on the FTPprogram you use
    • If you are concerned about this, rather copy the individual files across as per instructions below
  4. Login to the Magento Administrator console
  5. Using the main menu, navigate to System ? Cache Management
  6. Click “Select All” at the top left of the “Cache Storage Management” table
  7. Select “Refresh” from the “Actions” drop-down list at the top right of the table and click “Submit”
  8. (Continued at “Common” below)

Common

  1. Using the main menu, navigate to System ? Configuration
  2. Using the left menu, navigate to Sales ? Payment Methods
  3. Enter the following details under the “PayFast” heading:
    • Enabled = Yes
    • Merchant ID = Integration page>
    • Merchant Key = Integration page>
    • Server = Test
    • Debugging = No
  4. Click “Save Config”
  5. The module is now and 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 is as follows:

app/code/community/PayFast/PayFast/Block/Payment/Info.php
app/code/community/PayFast/PayFast/Block/Form.php
app/code/community/PayFast/PayFast/Block/Request.php
app/code/community/PayFast/PayFast/controllers/NotifyController.php
app/code/community/PayFast/PayFast/controllers/RedirectController.php
app/code/community/PayFast/PayFast/etc/config.xml
app/code/community/PayFast/PayFast/etc/system.xml
app/code/community/PayFast/PayFast/Helper/Data.php
app/code/community/PayFast/PayFast/Model/Source/Server.php
app/code/community/PayFast/PayFast/Model/Info.phpapp/code/community/PayFast/PayFast/Model/Itn.php
app/code/community/PayFast/PayFast/Model/Standard.php
app/code/community/PayFast/PayFast/payfast.log
app/code/community/PayFast/PayFast/payfast_common.inc
app/design/frontend/default/default/template/payfast/form.phtml
app/etc/modules/PayFast_PayFast.xml

How can I test that it is working correctly?

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 Magento Administrator console
  2. Using the main menu, navigate to System ? Configuration
  3. Using the left menu, navigate to Sales ? Payment Methods
  4. Under the “PayFast” heading, change the “Server” setting to “Live”
  5. Click “Save Config”

See PayFast integration for Magento 2.0

How do I use PayFast with Magento 2.0?

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

What are the installation requirements?

  • A working Magento 2.0 installation

INSTALLATION AND TESTING

How do I install the PayFast module?

  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
  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 on 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

See Upgrading and FAQs

UPGRADING

No upgrades yet

FREQUENTLY ASKED QUESTIONS (FAQS)

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 notneed to set it on your account manually.

I get an “invalid url” error message when being redirected to PayFast!

This is due to one of 2 reasons: you are testing from a non internet accessible machine (e.g. a local development machine) or you have not setup your URLs in WHMCS correctly.

Non internet accessible machine

The module will only perform as expected if you are testing from an internet accessible machine (e.g.http://www.mydomain.co.za). It will not work from something like http://localhostorhttp://my.machine.local.

Ensure that you are testing on an internet accessible machine.

Where is my “base Magento folder”?

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

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

Directory structure of base Magento folder

USEFUL LINKS


 

Register your free account