Gravity Forms

Gravity Forms has one of the easiest interfaces to set up dynamic forms in WordPress. Both the site admin and the visitor that submitted the form can receive success notifications. Additional extensions such as integration with PayFast, makes it a really valuable tool, particularly when using the Pricing Fields.

Gravity Forms

Key Features

  • Drag and drop builder
  • Import and export data
  • Intelligent notifications
  • Pricing fields with PayFast payment


See PayFast integration

How do I use PayFast with Gravity Forms?

You can use PayFast with Gravity Forms by installing, which is a form creation plugin for WordPress.

This will give your WordPress site, form creation capabilities and we then provide a payment add-on for Gravity Forms which will enable you to accept payments with Gravity Forms using PayFast.

What are the installation requirements?

  • A working WordPress installation with the Gravity Forms Plugin installed


How do I install the PayFast module?

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

  1. Download the payment module from github
  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. Login to the WordPress Administrator console
  5. Go to ‘Plugins’ and activate the PayFast Gravity Forms plugin.
  6. Go to ‘Forms’?’Settings’?’PayFast’ and input your Merchant ID and Key, click save settings.
  7. Go to ‘Forms’?’Settings’, under ‘General Settings’, select ‘South African Rands’ for your currency, click save settings.
  8. You need to create a form with options included from the ‘Pricing Fields’ section and then go to ‘Forms’?’PayFast’?’Add New’ complete the form accordingly, select Sandbox and Debug for testing purposes.
  9. Click “Save”
  10. To test with the sandbox, use the following login credentials when redirected to the PayFast site (note: sandbox does not currently work for subscriptions):
    • Username:
    • Password: clientpass
  11. To setup a subcription select ‘Subscription’ under ‘Transaction Type’
    • Ensure that subscriptions are enabled on the Integration page (under Settings) on your PayFast account

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:


How can I test that it is working correctly?

If you followed the installation instructions above, the module is in “test” mode and you can test it by creating an invoice and completing the payment cycle through the PayFast sandbox, login 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, Instant EFT or Ukash 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.

See PayFast FAQs


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 “wp-content” folder in the archive to your base “wordpress” folder


What Gravity Forms license do I need to use the PayFast Plugin?

The PayFast plugin will work with anyone of the Gravity Forms licenses.

What is the payment flow?

PayFast works on browser redirection and will redirect the user to PayFast for payment after they click the “Make Payment” button on the Checkout page.

At this stage, the order has already been created in MarketPress with the status “Received”.

If the payment is CANCELLED during processing on PayFast:

  • The user will be returned to the “Transaction Results” page
  • The order status will be left as “Incomplete Sale”

If the payment is SUCCESSFUL through PayFast:

  • The user will be returned to the “Confirmed” page
  • The order status will be updated to the status “Paid”

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.

Where is my “base WordPress folder”?

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

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

Directory structure of base WordPress folder