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 does the PayFast integration work with Gravity Forms?

Once you have followed the installation instructions below and your form is live on your website, a buyer will be able to complete the form and an entry will be added to Gravity Forms once they check out.

When a successful payment is made, PayFast then sends back a payment notification (ITN) to Gravity Forms which will update the entry from processing to paid.

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 Gravity Forms 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. Go to ‘Plugins’ and activate the PayFast Gravity Forms plugin.
  6. Go to ‘Forms’ -> ‘Settings’ -> ‘PayFast’. Select ‘PayFast Debug’ and save settings.
  7. Go to ‘Forms’ -> ‘Settings’ -> ‘Settings’, under ‘General Settings’, select ‘South African Rands’ for your currency, and click save settings.
  8. PayFast Feeds are accessed via the PayFast sub-menu within the Form Settings for the Form you would like to integrate PayFast with. To create a new form, go to ‘Forms’ -> ‘New Form’.
  9. Go to ‘Forms’ and click ‘Edit’ for your new form and generate your form as required, including Pricing Fields, and Update
  10. Then, while still on your form,  go to ‘Settings’ -> ‘PayFast’ -> ‘Add New’ PayFast Feed. Complete the feed settings accordingly.
  11. To test, select ‘Test’ mode and leave the fields for merchant ID, Key and Passphrase empty. Click ‘Update Settings’ when you are ready.
  12. To set up a subscription 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 any other payment method 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 Recurring Billing


  1. To set up a subscription on a form, ensure that your form includes pricing fields for an initial amount and a recurring amount.
  2. On the form feed, select ‘Subscription’ under ‘Transaction Type’, and select your ‘Recurring Amount’ and your ‘Initial Amount’.
  3. Then select the ‘Frequency’ of the subscription and ‘Cycles’ (the amount of times it will be charged).
  4. On your PayFast merchant dashboard, ensure that subscriptions are enabled on the Integration page (under Settings).

Can I test recurring payments in test mode?

Yes, you will be able to test recurring payments in test mode. You will not need to make any further changes in order to test this.

See PayFast FAQs


Standard Upgrade Procedure

  1. Download the Gravity Forms 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 any one of the Gravity Forms licenses.

I’m stuck at “I understand” and clicking “Update Settings”, what do I do?

Please download the latest version of the Gravity Forms payment module

If you are using an older version, you will first need to set up a form, and then you will be able to select PayFast settings for that form and enter merchant ID etc, in a new feed. Please see from step 8 of the instructions on this page, above.

What is the payment flow? What happens if a buyer cancels?

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”
  • Although there is an entry on Gravity Forms for the merchant’s records, the buyer would need to fill out the form again and submit it in order to make a payment

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? What about the cancel url?

No. When using one of our payment modules, the ITN url is set automatically and you do not need to set it on your account manually. Please note that the return and notify URLs are set by the plugin. You can set the cancel URL to whatever you would like.

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