Gravity Forms eWAY payments

GravityForms eWAY adds a credit card payment gateway for eWAY in Australia to the Gravity Forms plugin, using eWAY’s Direct Payments API or Stored Payments API.

  • build online donation forms
  • build online booking forms
  • build simple Buy Now forms
  • accept recurring payments

NB: this plugin extends Gravity Forms; you still need to install and activate Gravity Forms!

Download Gravity Forms eWAY. Get support in the forum. View the changelog.

Recurring payments

Thanks to the generous sponsorship of Castle Design, recurring payments are supported. This means that you can build subscription and donation forms with weekly, monthly or yearly billing. Examples will be presented here as time permits.

Help support this plugin

If you like this plugin and would like to help support its maintenance and further development, please consider making a donation.


Filter hooks

Developers can use these filter hooks to modify some eWAY invoice properties. Each filter receives a string for the field value, and the Gravity Forms form array.

  • gfeway_invoice_desc for modifying the invoice description
  • gfeway_invoice_ref for modifying the invoice reference
  • gfeway_invoice_trans_number for modifying the invoice transaction reference
  • gfeway_invoice_option1 for modifying the invoice option1 field (one-off payments)
  • gfeway_invoice_option2 for modifying the invoice option2 field (one-off payments)
  • gfeway_invoice_option3 for modifying the invoice option3 field (one-off payments)
  • gfeway_invoice_cust_comments for modifying the invoice customer comments field (recurring payments)
  • gfeway_recurring_periods for filtering the available recurring periods (from ‘weekly’, ‘fortnightly’, ‘monthly’, ‘yearly’)


  1. Install and activate the Gravity Forms plugin
  2. Upload this plugin to your /wp-content/plugins/ directory.
  3. Activate the plugin through the ‘Plugins’ menu in WordPress.
  4. Edit the eWAY payment gateway settings to set your eWAY Customer ID and options

Gravity Forms will now display the Credit Card and Recurring fields under Pricing Fields when you edit a form.

Building a Form with Credit Card Payments

  • add one or more product fields or a total field, or a recurring field, so that there is something to be charged by credit card
  • add an email field and an address field if you want to see them on your eWAY transaction; the first email field and first address field on the form will be sent to eWAY
  • add a credit card field; if you have a multi-page form, this must be the on the last page so that all other form validations occur first
  • add a confirmation message to the form indicating that payment was successful; the form will not complete if payment was not successful, and will display an error message in the credit card field

NB: you should always test your gateway first by using eWAY’s test server. To do this, set your eWAY Customer ID to the special test ID 87654321 and select Use Test Environment. When you go to pay, the only card number that will be accepted by the test server is 4444333322221111. This allows you to make as many test payments as you like, without billing a real credit card.

Frequently Asked Questions

What is eWAY?

eWAY is a leading provider of online payments solutions for Australia, New Zealand and the UK. This plugin integrates with the Australian Direct Payments and Stored Payments gateways, so that your website can safely accept credit card payments.

Will this plugin work without installing Gravity Forms?

No. This plugin adds an eWAY payment gateway to Gravity Forms so that you can add online payments to your forms. You must purchase and install a copy of the Gravity Forms plugin too.

Can I use other eWAY gateways, outside of Australia?

Not yet. There are plans to integrate eWAY’s Rapid Payments API sometime in 2013, so check back in a while.

Can I use the eWAY hosted payment form with this plugin?

No, this plugin only supports the Direct Payments API.

What is Stored Payments?

Like Direct Payments, the purchase information is sent to eWAY for processing, but with Stored Payments it isn’t processed right away. The merchant needs to login to their eWAY Business Centre to complete each transaction. It’s useful for shops that do drop-shipping and want to delay billing. Most websites should have this option set to No.

What is Beagle?

Beagle is a service from eWAY that provides a level of fraud protection for your transactions. It uses information about the IP address of the purchaser to suggest whether there is a risk of fraud. You must configure Beagle rules in your MYeWAY console before enabling Beagle in this plugin.

What Gravity Forms license do I need?

Any Gravity Forms license will do. You can use this plugin with the Personal, Business or Developer licenses.

Where do I find the eWAY transaction number?

Successful transaction details including the eWAY transaction number and bank authcode are shown in the Info box when you view the details of a form entry in the WordPress admin. Recurring payments don’t get a transaction number when the payment is established, however, so only the payment status and date are recorded.

How do I add a confirmed payment amount and transaction number to my Gravity Forms admin or customer email?

Browse to your Gravity Form, select Notifications and use the Insert Merge Tag dropdown (Payment Amount, Transaction Number and Auth Code will appear under Custom at the very bottom of the dropdown list).

Why is the amount paid bigger than the form total when test mode is enabled?

When test mode is enabled, the payment amount is rounded up by default, because the eWAY sandbox server returns different error codes when the amount has cents. This can be a useful feature for testing how your website displays errors, but you normally don’t want it when testing a payment form.

Why do I get an error “This page is unsecured”?

When your form has a credit card field, it accepts very sensitive details from your customers and these must be encrypted. You must have an SSL certificate installed on your website, and your page must be accessed via SSL (i.e. the page address must start with “https:”). You can force a page with a credit card form to be accessed via SSL by ticking Force SSL on the Credit Card Field advanced settings page; see screenshots.

Can I do recurring payments?

Yes, thanks to the generous sponsorship of Castle Design. If you use conditional logic to hide/show a product field and a recurring payment field, you can even let customers choose between a one-off payment and a recurring payment.

I get an SSL error when my form attempts to connect with eWAY

This is a common problem in local testing environments. Please read this post for more information.

Can I use this plugin on any shared-hosting environment?

The plugin will run in shared hosting environments, but requires PHP 5 with the following modules enabled (talk to your host). Both are typically available because they are enabled by default in PHP 5, but may be disabled on some shared hosts.

  • XMLWriter
  • SimpleXML