• Resolved Chantal Coolsma

    (@chantalc)


    Is there a way to hook in the payment succeed/failed status to fire a custom function?

    I am working on a project where a user is created, but this now happens after form submission. A user only should be created if payment was successful.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Indigo Webstudio

    (@indigonl)

    Hi Chantal,

    We are always willing to consider additional hooks or filters but we prefer to use the already available filters. Did you have a look at https://docs.gravityforms.com/category/developers/hooks/actions/payment-fields/. It seems that there are already a lot of possibilities to fire a custom function with one of those functions.

    A quick look made me think that you could use https://docs.gravityforms.com/gform_post_payment_completed/. Please let me know if this helps.

    Ciao, Petra

    Thread Starter Chantal Coolsma

    (@chantalc)

    Yes. Thanks.

    jpgsoluc

    (@jpgsoluc)

    This hook is not working for me -> gform_post_payment_completed <-
    it never enters into the callback.

    Gravity Forms -> 2.4.6.8
    GF Mollie -> 1.10.1

    This is the snippet on my functions.php file:

    add_action( ‘gform_post_payment_completed’, ‘gform_post_payment_completed’, 10, 2 );

    function gform_post_payment_completed($entry,$action) {
    var_dump($action);
    echo ‘<br><br>’;
    var_dump($entry);
    die(“here”);
    }


    Thanks!

    Plugin Author Indigo Webstudio

    (@indigonl)

    Hi jpgsoluc,

    I am not sure of what you are trying to achieve here. There is no way of seeing this output in a var_dump as the hook is triggered upon callback of the payment status. If you want to output this content you should use some form of logging or you could even opt for something like mailing it to yourself from the function.

    I hope you understand that we can not give support on standard gravityforms functions.

    Ciao, Petra

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Payment successful hook?’ is closed to new replies.