Interaction observing breaks Westpac & St. George PayWay NET Payment Plugin

[ad_1]

Are you using the “Direct Post” integration method in the payment plugin?

Thread Starter
avong

(@avong)

Yes. We’re using the older version of the plugin that only supports “Direct Post”

If you’re interested in trying a fix right now, you could paste this chunk of code into akismet-frontend.js right after the line var form = forms[i];, which is line 45 in version 5.0:

var formAction = form.getAttribute( 'action' );

// Ignore forms that POST directly to other domains; these could be things like payment forms.
if ( formAction ) {
	// Check that the form is posting to an external URL, not a path.
	if ( formAction.indexOf( 'http://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) {
		if ( formAction.indexOf( 'http://' + window.location.hostname + '/' ) != 0 && formAction.indexOf( 'https://' + window.location.hostname + '/' ) != 0 ) {
			continue;
		}
	}
}

That should prevent the interaction observation code from being run on any forms that submit to other sites, like credit card forms. If you try it, can you let me know whether it works for you?

Thread Starter
avong

(@avong)

That worked. Will this get patched in the next update? Otherwise I will have to revert back to 4.2.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer