How do I integrate PayFast with WP eCommerce?

How do I integrate PayFast with WP eCommerce?

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

Installation requirements

  • A working WordPress installation with the WP e-Commerce plugin installed

Installation and testing

Manual Method

To install the PayFast payment module, do the following::

  1. Download the payment module from our site.
  2. Unzip the module to a temporary location on your computer.
  3. Copy the wp-content folder in the archive to your base wordpress 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. Log in to the WordPress Administrator console.
  5. Using the main menu, navigate to Settings > Store.
  6. Using the WP e-Commerce menu, navigate to Payments.
  7. Under General Settings, check the PayFast item and click Update.
  8. Click the Edit option for PayFast, the PayFast options will show in the right-hand tab.
  9. Ensure that the following details are set correctly:
    • Status for Pending Payments: Incomplete Sale
    • Status for Successful Payments: Accepted Payment
  10. Leave everything else as per default and click Update.
  11. The module is now ready to be tested with the PayFast Sandbox. To test with the sandbox, use the following login credentials when redirected to the PayFast site:

Copying 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:

wp-content/plugins/wp-e-commerce/wpsc-merchants/payfast.log
wp-content/plugins/wp-e-commerce/wpsc-merchants/payfast.php
wp-content/plugins/wp-e-commerce/wpsc-merchants/payfast_common.inc

Using WordPress Plugin System (plugin version 1.31 only)

To install the PayFast payment module, do the following:
  1. Unzip the module to a temporary location on your computer.
  2. Go to WordPress's plugin page.
  3. Select to install a new plugin using a file.
  4. When prompted for a file, select the “payfast-wp-e-commerce.zip” file from your temporary location.
  5. Log in to the WordPress Administrator console.
  6. Using the main menu, navigate to Settings > Store.
  7. Using the WP e-Commerce menu, navigate to Payments.
  8. Under General Settings, check the PayFast item and click Update.
  9. Click the Edit option for PayFast, the PayFast options will then be shown in the right-hand tab.
  10. Ensure that the following details are set correctly: 
    • Status for Pending Payments: Incomplete Sale
    • Status for Successful Payments: Accepted Payment
  11. Leave everything else as per default and click Update.
  12. The module is now and ready to be tested with the PayFast Sandbox. To test with the sandbox, use the following login credentials when redirected to the PayFast site: 

Testing that it works 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 log in 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.

Going live

In order to make the module 'LIVE', do the following:
  1. Log in to the WordPress Administrator console.
  2. Using the main menu, navigate to Settings > Store.
  3. Using the WP e-Commerce menu, navigate to Payments.
  4. Under General Settings, highlight the PayFast item and click Edit.
  5. In the right-hand tab, change the configuration values as below: 
    • Transaction Server = “LIVE”
    • Merchant ID = Integration Page>
    • Merchant Key = Integration Page>
    • Debugging = Off
  6. Change the other fields as per your preferences.
  7. Click Save.
Helpful?
 
 



    • Related Articles

    • How do I integrate PayFast with WP Invoice?

      You can use PayFast with WP Invoice by installing http://wordpress.org/plugins/wp-invoice/, which is an invoicing and billing plugin for WordPress. This will give your WordPress site invoicing capabilities and we then provide a payment module for WP ...
    • How do I integrate PayFast with WP EasyCart?

      This module was developed by WP EasyCart, so please visit their website for integration support. You will need to be registered on PayFast to accept payments and get your Merchant ID. In order to use this integration, you would need to have the WP ...
    • How do I integrate PayFast with WP Invoicing?

      This module was developed by WP Invoicing, so please visit their website for integration support. You will need to be registered on PayFast to accept payments and get your Merchant ID. For further inquiries, visit the Invoice inquiry page. Demo site ...
    • I've installed the PayFast module on WP eCommerce, but PayFast still doesn't appear as an option.

      Are you using the 'Gold Cart for WP e-Commerce' paid-for extension to WP e-Commerce? If so, you will need to move the PayFast files to a different location to have PayFast appear as a payment method. Move the individual PayFast module files from: ...
    • How do I integrate PayFast with Comalytics eCommerce software?

      This module was developed by Comalytics, so please visit their website for integration support. You will need to be registered on PayFast to accept payments and get your Merchant ID.