EDIT
I see you’ve provided some custom hooks that fire on successful payment. But gfdpspxpay_process_confirmation and gfdpspxpay_process_return still fire when payment cancelled.
Thanks!
Haha yes,
But is there a way to stop it firing after clicking cancel on the DPS page?
Cheers,
Nick
If what you want to do is only send notifications on success, make the notifications conditional on the Authcode (bank authorisation code).
AuthCode is not <empty string> => success
AuthCode is <empty string> => failure
cheers,
Ross
Thanks for the quick response Ross!
I have a function that creates posts etc that I want to kick off but only if payment was successful. It was using gform_after_submission, but now this runs too early, so I’m just calling the function through gfdpspxpay_process_confirmation_parsed and it works perfectly, except that it also works when cancelled.
I see what you mean, but do I get it out of the entry meta or can it be accessed through the gfdpspxpay_process_confirmation_parsed hook?
Cheers.
I’ve got it checking for empty authcode, thanks. Problem now is if I refresh the page with the returned DPS query string, it re-runs the confirmation hook.
Any ideas there?
Resolved by version 1.5.0, with new action hooks