Page 1 of 1

Paypal IPN action hook

PostPosted: April 18th, 2011, 3:24 pm
by sterup
I'm trying to get the user id for the user that has just been signed up once the PayPal IPN has been received. I see an action hook but I'm not sure how I would get the user id from it. The action hook I'm looking at is ws_plugin__s2member_during_paypal_notify. Would I be able to identify the user id with this and get the paypal transaction id from it? What argument should I use?

Re: Paypal IPN action hook

PostPosted: April 18th, 2011, 4:13 pm
by sterup
Sorry I actually meant ws_plugin__s2member_after_paypal_notify. That should give me the paypal transaction number but how do I get the user id from this action hook?

Re: Paypal IPN action hook

PostPosted: April 19th, 2011, 1:43 am
by Cristián Lávaque
You can see the hooks available inside /s2member/includes/classes/paypal-notify-in.inc.php.

And these posts by Jason may help you:
viewtopic.php?f=36&t=2793#p8226
viewtopic.php?f=4&t=258#p966

Re: Paypal IPN action hook

PostPosted: April 19th, 2011, 3:27 pm
by sterup
Ok that didnt answer my question. Maybe I wasnt clear with my question. I've hooked into what I thought was the right hook but it doesnt call my function when the paypal transaction is complete. I'm trying to get the paypal transaction id once the transaction is complete but It's not working. Any suggestions on what hook I should use to call my function when the transaction is complete? I thought that it was ws_plugin__s2member_after_paypal_notify but my function never gets called. I also tried ws_plugin__s2member_after_paypal_return but again my function never gets called.

Re: Paypal IPN action hook

PostPosted: April 19th, 2011, 4:13 pm
by sterup
I guess this is a good place to use your notifications API. I have it working using the notifications API. Will need to do some testing but its getting me the data that I need. Sorry for trying to do things the hard way. LOL

Re: Paypal IPN action hook

PostPosted: April 19th, 2011, 10:12 pm
by Cristián Lávaque
sterup wrote:I guess this is a good place to use your notifications API. I have it working using the notifications API. Will need to do some testing but its getting me the data that I need. Sorry for trying to do things the hard way. LOL


Ah cool! :)

I guess I didn't understand well what you were trying to do and that's why I didn't think of those, sorry about that. I'm glad you figured it out.