• Resolved avong

    (@avong)


    Your recent feature regarding ‘Interaction observing’ is breaking a WooCommerce Payment plugin we’re using “Westpac & St. George PayWay NET Payment Gateway (1.4.1)”

    All the Akismet data prefixed with “ak_” are being submitted as part of the payment process causing the banking payment gateway to fail. The site is running older plugin and WC version due to the other legacy related requirements.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Christopher Finke

    (@cfinke)

    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”

    Plugin Author Christopher Finke

    (@cfinke)

    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( 'https://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) {
    		if ( formAction.indexOf( 'https://' + 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.

    Plugin Author Christopher Finke

    (@cfinke)

    It will be in version 5.0.1, which will be available in the next hour.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Interaction observing breaks Westpac & St. George PayWay NET Payment Plugin’ is closed to new replies.