PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

gform_paypal_fulfillment Not Firing?

  1. dcholewa
    Member

    Can someone help me diagnose an issue that I'm having with gform_paypal_fulfillment? Here's the scenario:

    1. test registration form sends data to paypal sandbox
    2. sandbox appears to be returning data correctly, because user is registered according to Add User Registration plugin, and database contains transaction IDs, "approved" status, etc.
    3. At this point, I'd expect my basic function to fire and echo the text on the form's confirmation screen. The basic function from functions.php, which was essentially copied from the documentation:

    add_action("gform_paypal_fulfillment", "process_order", 10, 2);
    function process_order($entry, $config, $transaction_id, $amount) {
    echo 'hello from the paypal fulfillment function';
    }

    4. ...But I get no echo.

    What other info can I provide to help with diagnosis? I've got several other GF hooks that are working as expected.

    Thanks!

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  2. You aren't going to see the echo. That hook is going to be triggered by PayPal IPN when it communicates back to your site that payment has been received. So you are never going to see that echo output.

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  3. dcholewa
    Member

    Thanks, Carl. So if I can't see the echo, what else can I do (besides blind testing) to see and verify the variables that I'm trying to manipulate?

    Is gform_user_registered still valid at this stage?

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  4. I'm not sure. Maybe have your test code do something like send an email or write to a log file or something. The fulfillment takes place when PayPal's IPN communicates back to your site so it happens behind the scenes.

    Yes, gform_user_registered fires immediately after the user has been registered.

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  5. dcholewa
    Member

    Will gform_user_registered not echo either?

    I ask because I was using this hook successfully (with echos) prior to adding the Paypal component. Now, I get no echos from it, and none of my functionality is working. Does it still have access to $user_id? (I would think it would.)

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  6. ANYTHING that is triggered by PayPal IPN isn't going to echo. If you have configured User Registration to only happen after payment has been received, then it's going to be triggered by IPN which means it's going to happen behind the scenes.

    Because you are using PayPal those are triggered as a result of an IPN callback by PayPal and not while you are submitting the form.

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink
  7. dcholewa
    Member

    Thanks for the speedy replies, Carl. I really appreciate it.

    Posted 13 years ago on Wednesday August 31, 2011 | Permalink

This topic has been resolved and has been closed to new replies.