Title: DPS Cancel
Last modified: August 30, 2016

---

# DPS Cancel

 *  Resolved [wpnicknz](https://wordpress.org/support/users/wpnicknz/)
 * (@wpnicknz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/)
 * Hi,
 * When you cancel the payment on the DPS form, it still triggers the gform_after_submission
   hook.
 * In fact, just visiting the payment page fires it.
 * Any ideas?
 * Thanks!
 * [https://wordpress.org/plugins/gravity-forms-dps-pxpay/](https://wordpress.org/plugins/gravity-forms-dps-pxpay/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [wpnicknz](https://wordpress.org/support/users/wpnicknz/)
 * (@wpnicknz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6497951)
 * 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!
 *  Plugin Author [webaware](https://wordpress.org/support/users/webaware/)
 * (@webaware)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6497977)
 * Another happy hooker 🙂
 * cheers,
    Ross
 *  Thread Starter [wpnicknz](https://wordpress.org/support/users/wpnicknz/)
 * (@wpnicknz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6497982)
 * Haha yes,
 * But is there a way to stop it firing after clicking cancel on the DPS page?
 * Cheers,
    Nick
 *  Plugin Author [webaware](https://wordpress.org/support/users/webaware/)
 * (@webaware)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6497985)
 * 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
 *  Thread Starter [wpnicknz](https://wordpress.org/support/users/wpnicknz/)
 * (@wpnicknz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6497994)
 * 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.
 *  Thread Starter [wpnicknz](https://wordpress.org/support/users/wpnicknz/)
 * (@wpnicknz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6498058)
 * 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?
 *  Plugin Author [webaware](https://wordpress.org/support/users/webaware/)
 * (@webaware)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6498231)
 * Resolved by version 1.5.0, with new action hooks

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘DPS Cancel’ is closed to new replies.

 * ![](https://ps.w.org/gravity-forms-dps-pxpay/assets/icon-256x256.png?rev=2590624)
 * [GF Windcave Free](https://wordpress.org/plugins/gravity-forms-dps-pxpay/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-dps-pxpay/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-dps-pxpay/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-dps-pxpay/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-dps-pxpay/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-dps-pxpay/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [webaware](https://wordpress.org/support/users/webaware/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/dps-cancel/#post-6498231)
 * Status: resolved