Key Features

Integration

How do I use PayFast with VirtueMart?

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

What are the installation requirements?

A working Joomla and VirtueMart installation

PHP cURL extension

Ask your host if you are not sure if this is available

INSTALLATION AND TESTING

How do I install the PayFast module?

VirtueMart 2.0.x (Not version 2.0.0)

This module is currently working with Joomla 1.7 and 2.5 and using Virtuemart 2.0. The plugin may work with Joomla 1.5 and 1.6, but this has not been tested. To install the PayFast payment module, follow the instructions below:

Fill in the “Payment Method Information” tab making sure to select “VM – Payment, PayFast” as the “Payment Method”

Click Save

Review the settings on the “Configuration” tab

Click Save

The module is now ready to be tested with the Sandbox, if the “Sandbox” setting is set to “Yes”

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:

Version 1.11 -> 1.20

Standard Upgrade Procedure

Copy the “administrator” folder in the archive to your base “joomla” folder

This should only overwrite existing PayFast files, and no other 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 the main menu, navigate to Components -> VirtueMart

Using the VirtueMart menu, navigate to Store -> List Payment Methods

Click on the “PayFast” payment method

Click on the “Configuration” tab

Change the configuration values as below:

Transaction Server = “LIVE”

Merchant ID = Integration page>

Merchant Key = Integration page>

(Change the other fields as per your preferences)

Copy the contents of the “payment_extra_info.php” file into the “Payment Extra Info” field

Click Save

VirtueMart 2.x

Version 1.00 -> 1.02

Plugin (Joomla 1.7 or 2.5.4)

Install the PayFast plugin via the Joomla Extension system

Manual

Follow the same principle as installation by copying the files (except the .zip file) to your Joomla root directory.

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

Modifying the “Pending” status setting doesn”t work as expected

Modifying the order statuses within VirtueMart is not recommended and requires expert knowledge of how VirtueMart works.

Modifying the Pending status setting in the PayFast module is not going to change the status an order gets when it is first created. That is up to VirtueMart itself. That setting works differently to the way the Successful and Cancelled ones work. For the Pending one, you are basically telling that PayFast module what status is considered to be “Pending” in your VirtueMart installation, not what the module must set pending payments to, as that is up to VirtueMart when the order is first created.

The Successful and Cancelled options are however used by the module to update the order status appropriately based on feedback from PayFast.

If you want to change the VirtueMart statuses in line with your business processes, you will need to consult the VirtueMart site or the internet for help in this regard as to what to do within VirtueMart to achieve this and then update the PayFast module “pending” option in line with your changes to VirtueMart.

Where is my “base Joomla folder”?

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

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

Can I display my prices in currencies other than ZAR?

Yes, you can display your prices in currencies other than ZAR, but PayFast can only process payments in ZAR and when the user checks out, whatever currency they have selected to display your product prices will be converted to ZAR.

VirtueMart 1.0.x & VirtueMart 1.1.x

To set this up, do as follows:

Install the “VirtueMart Currency Selector” module

Enable the module within the “Module Manager”

Click on the module name with the “Module Manager”

In the “Module Parameters” section, select which currencies you want to display in the “The currencies to display” list

Click Save

For this to work properly though, you must ensure that your store is configured to only accept ZAR! This is done as follows:

Using the VirtueMart menu, navigate to Store ->Edit Store

Under the “Currency Display Style” heading, ensure that the “Currency” drop-down is set to “South Africa Rand”

In the same area, find the “List of accepted currencies” list and ensure that only “South African Rand” is selected in this list

Click Save

VirtueMart 1.0.x & VirtueMart 1.1.x

To set this up, do as follows:

Using the VirtueMart menu, navigate to Shop -> Shop

Under the “Currency” heading, ensure that the “Currency” dropdown is set to “South Africa Rand”

Under the “List of accepted currencies”, only select “South Africa Rand”

Click Save

I get the error message “Direct Access to this location is not allowed.”!

You”ll get this error message when there is a mismatch between your version of VirtueMart and and version of the PayFast VirtueMart module you have installed.

There are three versions of VirtueMart currently in circulation: 2.0.0, 1.1.x, and 1.0.x. They are not the same when it comes to payments and we provide modules for all of them.

You will get the error message “Direct Access to this location is not allowed.” if you have used the PayFast module intended for 1.0.x on VirtueMart 1.1.x or vice versa.

To correct this error, download the correct version of the PayFast module from our shopping cartspage and install the module as per the corresponding instructions on this page.