• Resolved nwells

    (@nwells)


    Noticed that the response from DPS always ended up on a 404 page rather than taking on any of the logic from Gravity Forms. From looking at the code it appears the action “parse_request” wasn’t getting triggered.

    I suspect this was related to the theme I’m using and the priority of the 404 page compared to this action setup. To fix I increased the priority to 50 and it worked fine. This is the new line of cod ein class.GFDpsPxPayPlugin.php on line 60:

    add_action(‘parse_request’, array($this, ‘processDpsReturn’), 50); // process DPS PxPay return

    Hope this helps

    https://www.ads-software.com/plugins/gravity-forms-dps-pxpay/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author webaware

    (@webaware)

    G’day nwells,

    Thanks for the info. It surprises me that lowering the priority to 50 worked, I’d have thought increasing it to 5 would be the fix because it would happen sooner than the default priority of 10. Did you try a higher priority (smaller number) first?

    Is the theme a stock theme from somewhere or a custom theme?

    For another add-on I’ve written, I use the do_parse_request hook instead, because it totally bypasses such things as 404 checks. Would you be up for testing a dev version that uses the same approach for Payment Express? I can probably knock one up in the next day or so.

    cheers,
    Ross

    Thread Starter nwells

    (@nwells)

    Hey

    Yep I initially tried 5 and nothing changed so went the other way and it worked.

    I’ve just done a scan through all the themes and plugins installed and there is another plugin that makes use of the parse_request hook and its priority is set to 1. The plugin that uses the hook is designed to restrict visitors to the website by IP so guess that makes sense to be priority 1. Not sure why lowering the priority helped – perhaps there is something in WP core messing with it in my install?

    Yes I’d be happy to trial a dev version that works a different way for you – I’ll be out till Monday so can try then if you’re ready.

    Cheers
    Nigel

    Plugin Author webaware

    (@webaware)

    G’day Nidel,

    Thanks, will sort something out on Saturday if I get a chance. It’s a relatively small change so I have some hope of fitting it in this weekend ??

    cheers,
    Ross

    Plugin Author webaware

    (@webaware)

    G’day Nigel,

    Please give this a burl:

    https://www.dropbox.com/s/cjvw079f9zmu8f5/gravity-forms-dps-pxpay-1.6.1-dev.zip

    * changed: process Payment Express return request on the do_parse_request filter, which happens before the parse_request action

    cheers,
    Ross

    Thread Starter nwells

    (@nwells)

    Hey Ross

    I’ve tried it out now and it worked just fine – no need to make any adjustments like before.

    Well done!

    Cheers
    Nigel

    Plugin Author webaware

    (@webaware)

    Excellent. It’ll be in the next release. You can keep using that version for now, it’s safe!

    cheers,
    Ross

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Action to process DPS not triggering’ is closed to new replies.