Gravity Forms eWAY Pro v1.0.5 has just been released. This is a big release that fixes a PHP 7 compatibility bug; ensures WordPress 4.6 compatibility; makes Client Side Encryption a little smarter; and a number of other fixes and enhancements.
I had been hoping to also squeeze Token Payments into this release, but it’s just not ready yet. There’s a few important fixes and enhancements that really need to get out to people, so I’ve put Token Payments aside while I get this release out.
NB: if you are running a 1.1.0 alpha test version for token payments, please do not install 1.0.5 or you will lose token payments! 1.1.0-alpha4 has all of the fixes and enhancements that 1.0.5 does. If you’re running an earlier alpha version, please contact me for an update.
Client Side Encryption
When eWAY added Client Side Encryption to their Rapid API, they did a great thing in protecting customers’ credit card details from the threat of hackers. Unfortunately, they didn’t do the same thing for the Recurring Payments API, which means that forms that conditionally support both methods of payment have a problem: how do you only use Client Side Encryption sometimes? It turns out to be quite tricky with Gravity Forms because it is just so flexible. But I’ve found a way, so now you can use the Direct Connection method for one-off payments and still accept recurring payments on the same form, using Gravity Forms conditional logic. For details on setting this up, see the mix standard and recurring payments FAQ.
I finally upgraded my development environment to PHP 7, and found a few incompatibility bugs. For the technically minded, they were all due to the changes to indirect variable evaluation — you can read about that on PHP 7 backwards incompatible changes. The plugin is now compatible with PHP 7, and also still compatible with PHP 5.6+ (If you’re still running an older version of PHP, the plugin will probably still work — but you should upgrade your PHP version anyway to continue receiving security patches!)
WordPress 4.6 was going to deliver some major changes to accessing remote resources like eWAY, so this release changes how messages are sent to eWAY in line with this WordPress trac comment. It sounds like that was going to cause too much trouble so it’s no longer going ahead in the same way, but we’re covered “just in case”. The new approach is more future proof, so the change is for the better.
I discovered that there are web servers out there purporting to be “up to date” and still only offering PHP 5.3 (which went End of Life in 2014). Which would normally be OK, except one such server was still using a version of the PCRE regular expression library from 2006, and it didn’t support the magic
\K operator that I love so dearly. That wasn’t introduced until version 7.2 in 2007. I figure that it’s time, everyone should be up with PCRE supporting
\K, so I’ve added a warning when PCRE is too old. Really, anything less than version 8 is too old (it came out in 2009, over six years ago!)
I know that some websites are transitioning from the Free eWAY add-on to the Pro add-on, to get extra functionality / flexibility. Rather than force you to shift all of your forms in one hit, this release tells the Free add-on to leave processing to the Pro add-on when a form has a feed for the eWAY Pro add-on. You can now move across from Free to Pro one form at a time, as fast or as slow as you need. If you have a lot of forms, you might also like to try my free Inspect Gravity Forms add-on that shows you which forms use Credit Card fields and/or eWAY Pro add-on feeds.
The T2T Toolkit plugin keeps on giving; this time it’s a conflict with the Coupons add-on to Gravity Forms. I’ve now switched to using Gravity Forms’
get_order_total() to get the order total, since I can now depend on it being there. This should fix T2T Toolkit conflicts once and for all!
Client Side Encryption required by eWAY uses a script loaded from eWAY’s servers. I was always loading the full, unminified, developer-only script. I now only load that for developers (when
SCRIPT_DEBUG is set), and load the much smaller minified version for live sites. That should reduce page load times just a little for forms using eWAY.
One thing that Client Side Encryption took away from Gravity Forms was the ability to see the card number and record a partial number in the entry. This release adds back partial card numbers.
Shipping Address can be useful for some forms, but there are many scenarios where there is no need for a shipping address — donations, online club membership, digital sales — so it seems sensible to make the default setting for new eWAY feeds to leave Shipping Address empty. Now, if you do need a shipping address sent to eWAY, just pick one of the other options for Shipping Address.
Creating a new feed is now easier in another way. If you have Name, Address, Email, Phone, or Website fields in your form, they will automatically be mapped to eWAY fields in a new feed. It can be a little tedious picking each of the subfields in an Address field, for example, so this ought to save everyone a little time and tedium! Of course, you can still change the mappings to whatever you like — including empty (no mapping).
If you have a few feeds on your form, it can be easy to get confused about which feeds have what settings. The feeds list now shows whether feeds are set to Live or Test (Sandbox) mode, and which method they use (Direct / Shared Page / Recurring).
You can update to the latest version from your WordPress plugin admin page. Here’s the full changelog for Gravity Forms eWAY Pro.