VirtueMart

VirtueMart is an Open Source E-Commerce solution to be used together with a Content Management System (CMS) called Joomla!

VirtueMart

Key Features

  • Inventory management
  • Open-source and free
  • Powerful admin features
  • Physical or virtual goods

Integration

See PayFast integration for v1.0.x

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 1.0.x

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 “administrator” folder in the archive to your base “joomla” 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 the Joomla Administrator console
  5. Using the main menu, navigate to Components -> VirtueMart
  6. Using the VirtueMart menu, navigate to Store -> Add Payment Method
  7. Enter the following details in the “Payment Method Form” tab:
    • Active? =
    • Payment Method Name = “PayFast”
    • Code = “PF”
    • Payment class name = “ps_payfast”
    • Payment method type = “PayPal (or related)”
    • (Leave all other fields as they are)
  8. Click Save
  9. Click on the newly added “PayFast” method in the payment methods list
  10. Click on the Configuration tab
  11. Copy the contents of the “payment_extra_info.php” file into the “Payment Extra Info” field
  12. Click Save
  13. The module is now ready to be tested with the Sandbox. Use these merchant identifiers when using the test server:
    • Merchant ID: 10000100
    • Merchant Key: 46f0cd694581a
  14. 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:

VirtueMart 1.0.x

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

administrator/components/com_virtuemart/payfast_notify.php
administrator/components/com_virtuemart/classes/payfast.log
administrator/components/com_virtuemart/classes/payfast_common.inc
administrator/components/com_virtuemart/classes/payment/ps_payfast.cfg.php
administrator/components/com_virtuemart/classes/payment/ps_payfast.php
administrator/components/com_virtuemart/html/checkout.payfast.php

I”m ready to go live! What do I do?

In order to make the module “LIVE”, follow the instructions below:

VirtueMart 1.0.x
  1. Login to the Joomla Administrator console
  2. Using the main menu, navigate to Components -> VirtueMart
  3. Using the VirtueMart menu, navigate to Store -> List Payment Methods
  4. Click on the “PayFast” payment method
  5. Click on the “Configuration” tab
  6. 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)
  7. Click Save

See PayFast integration for v1.1.x

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 1.1.x

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 “administrator” folder in the archive to your base “joomla” 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 the Joomla Administrator console
  5. Using the main menu, navigate to Components -> VirtueMart
  6. Using the VirtueMart menu, navigate to Store -> Add Payment Method
  7. Enter the following details in the “Payment Method Form” tab:
    • Active? =
    • Payment Method Name = “PayFast”
    • Code = “PF”
    • Payment class name = “ps_payfast”
    • Payment method type = “HTML-Form based (e.g. PayPal)”
    • (Leave all other fields as they are)
  8. Click Save
  9. Click on the newly added “PayFast” method in the payment methods list
  10. Click on the Configuration tab
  11. Copy the contents of the “payment_extra_info.php” file into the “Payment Extra Info” field
  12. Click Save
  13. The module is now ready to be tested with the Sandbox. Use these merchant identifiers when using the test server:
    • Merchant ID: 10000100
    • Merchant Key: 46f0cd694581a
  14. 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:

VirtueMart 1.1.x

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

administrator/components/com_virtuemart/payfast_notify.php
administrator/components/com_virtuemart/classes/payfast.log
administrator/components/com_virtuemart/classes/payfast_common.inc
administrator/components/com_virtuemart/classes/payment/ps_payfast.cfg.php
administrator/components/com_virtuemart/classes/payment/ps_payfast.php
administrator/components/com_virtuemart/html/checkout.payfast.php

I”m ready to go live! What do I do?

In order to make the module “LIVE”, follow the instructions below:

VirtueMart 1.1.x
  1. Login to the Joomla Administrator console
  2. Using the main menu, navigate to Components -> VirtueMart
  3. Using the VirtueMart menu, navigate to Store -> List Payment Methods
  4. Click on the “PayFast” payment method
  5. Click on the “Configuration” tab
  6. 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)
  7. Click Save

See PayFast integration for 2.0.x

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:

Plugin Method
  1. Download the payment module from our site
  2. Unzip the module to a temporary location on your computer
  3. Go to Joomla”s Extension manager
  4. Select the PayFast zipfile (mod-virtuemart_2_0.zip) and install it
  5. Still in the Extension Manager of Joomla, click on ”Manage”
  6. Search for the PayFast module, and activate it
  7. Using the main menu, navigate to Components -> VirtueMart
  8. Using the VirtueMart menu, navigate to Shop -> Payment Methods
  9. Review the settings on the “Configuration” tab of the PayFast plugin
  10. Click Save
  11. The module is now ready to be tested with the Sandbox, if the “Sandbox” is to be used, make sure setting is set to “Yes”
  12. To test with the sandbox, use the following login credentials when redirected to the PayFast site:
    • Username: sbtu01@payfast.co.za
    • Password: clientpass
Manual Method
  1. Download the payment module from our site
  2. Unzip the module to a temporary location on your computer
  3. Copy the “administrator”, “plugin”, “images”, folder in the archive to your base “joomla” 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. Copy the following SQL query onto your Joomla database
  5. If your database makes use of prefixes on the tables, please replace #### with your prefix
  6. Joomla 1.5
    • INSERT INTO `####_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) VALUES (NULL, 'VMPayment - PayFast', 'payfast', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '');
  7. Joomla 1.6 ? 2.5
    • INSERT INTO `####_extensions` (`name`,`type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES ('VM - Payment, PayFast' , 'plugin', 'payfast','vmpayment',0,1,1,0, '{ "legacy":true,"name":"VMPAYMENT_PAYFAST","type":"plugin","creationDate":"January 2012","author":"PayFast","copyright":"Copyright (C) 2012 PayFast (Pty) Ltd. All rights reserved.","authorEmail":"","authorUrl":"http://www.payfast.co.za","version":"1.00","description":"PayFast is a populartpayment provider and available in South Africa.  ","group":"" }', '', '', '', 0, '0000-00-00 00:00:00', 0, 0);
  8. Login to the Joomla Administrator console
  9. Using the main menu, navigate to Components -> VirtueMart
  10. Using the VirtueMart menu, navigate to Shop -> Payment Methods
  11. Click “New” to create a new payment method
  12. Fill in the “Payment Method Information” tab making sure to select “VM – Payment, PayFast” as the “Payment Method”
  13. Click Save
  14. Review the settings on the “Configuration” tab
  15. Click Save
  16. The module is now ready to be tested with the Sandbox, if the “Sandbox” setting is set to “Yes”
  17. 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:

VirtueMart 2.x

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

images/stories/virtuemart/payment/payfast_logo.gif
images/stories/virtuemart/payment/payfast.png
administrator/language/en-GB/en-GB.plg_vmpayment_payfast.ini
administrator/language/en-GB/en-GB.plg_vmpayment_payfast.sys.ini
plugins/vmpayment/payfast/index.html
plugins/vmpayment/payfast/payfast.log
plugins/vmpayment/payfast/payfast.php
plugins/vmpayment/payfast/payfast.xml
plugins/vmpayment/payfast/payfast_common.inc

I”m ready to go live! What do I do?

In order to make the module “LIVE”, follow the instructions below:

VirtueMart 2.x
  1. Login to the Joomla Administrator console
  2. Using the main menu, navigate to Components -> VirtueMart
  3. Using the VirtueMart menu, navigate to Shop -> Payment Methods
  4. Click on the “PayFast” payment method
  5. Click on the “Configuration” tab
  6. Change the configuration values as below:
    • Sandbox = “No”
    • Merchant ID =
    • Merchant Key =
    • (Change the other fields as per your preferences)
  7. Click Save

See PayFast integration for 3.x

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 3.4.x and VirtueMart 3.3.x 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 3.x
  1. Download the payment module from our site
  2. Go to Joomla”s Extension manager
  3. Select the PayFast zipfile (mod-virtuemart_3.zip) and install it
  4. Still in the Extension Manager of Joomla, click on ”Manage”
  5. Search for the PayFast module, and activate it
  6. Using the main menu, navigate to Components -> VirtueMart
  7. Using the VirtueMart menu, navigate to Shop -> Payment Methods
  8. Click on ‘new’ and enter PayFast for payment name, publish, and choose VM Payment – PayFast for the payment method, then click save
  9. Review the settings on the “Configuration” tab of the PayFast plugin (Note: to test in sandbox do not set a passphrase)
  10. Click Save
  11. The module is now ready to be tested with the Sandbox, if the “Sandbox” is to be used, make sure setting is set to “Yes”
  12. To use the module in live mode enter your PayFast merchant ID and Key, and, if necessary, passphrase. Change sandbox to “No” and click save

See Upgrading and FAQs

UPGRADING

VirtueMart 1.0.x

Version 1.00 -> 1.01

See “Standard Upgrade Procedure”

Version 1.01 -> 1.02

See “Standard Upgrade Procedure”

Version 1.02 -> 1.10

See “Standard Upgrade Procedure”

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 “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
  4. Using the main menu, navigate to Components -> VirtueMart
  5. Using the VirtueMart menu, navigate to Store -> List Payment Methods
  6. Click on the “PayFast” payment method
  7. Click on the “Configuration” tab
  8. 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)
  9. Copy the contents of the “payment_extra_info.php” file into the “Payment Extra Info” field
  10. Click Save

VirtueMart 1.1.x

Version 1.00 -> 1.10

See “Standard Upgrade Procedure”

Version 1.10 -> 1.11

See “Standard Upgrade Procedure”

Version 1.11 -> 1.20

See “Standard Upgrade Procedure”

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 “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
  4. Using the main menu, navigate to Components -> VirtueMart
  5. Using the VirtueMart menu, navigate to Store -> List Payment Methods
  6. Click on the “PayFast” payment method
  7. Click on the “Configuration” tab
  8. 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)
  9. Copy the contents of the “payment_extra_info.php” file into the “Payment Extra Info” field
  10. Click Save

VirtueMart 2.x

Version 1.00 -> 1.02
Plugin (Joomla 1.7 or 2.5.4)
  1. Install the PayFast plugin via the Joomla Extension system
Manual
  1. 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”.

Directory structure of 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:

  1. Install the “VirtueMart Currency Selector” module
  2. Enable the module within the “Module Manager”
  3. Click on the module name with the “Module Manager”
  4. In the “Module Parameters” section, select which currencies you want to display in the “The currencies to display” list
  5. 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:

  1. Using the VirtueMart menu, navigate to Store ->Edit Store
  2. Under the “Currency Display Style” heading, ensure that the “Currency” drop-down is set to “South Africa Rand”
  3. In the same area, find the “List of accepted currencies” list and ensure that only “South African Rand” is selected in this list
  4. Click Save
VirtueMart 1.0.x & VirtueMart 1.1.x

To set this up, do as follows:

  1. Using the VirtueMart menu, navigate to Shop -> Shop
  2. Under the “Currency” heading, ensure that the “Currency” dropdown is set to “South Africa Rand”
  3. Under the “List of accepted currencies”, only select “South Africa Rand”
  4. 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.

USEFUL LINKS