Community Support Forums — WordPress® ( Users Helping Users ) — 2012-01-05T17:26:26-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=16461 2012-01-05T17:26:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=59801#p59801 <![CDATA[Re: Equivalent hook for notification API url]]> here (during_before_new_ccaps) and here (before_new_ccaps).

It looks like during_before_new_ccaps gets called before the user is added or ccaps are updated.

Statistics: Posted by Raam Dev — January 5th, 2012, 5:26 pm


]]>
2012-01-05T04:02:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=59752#p59752 <![CDATA[Re: Equivalent hook for notification API url]]>
Code:
ws_plugin__s2member_during_paypal_notify_before_new_ccaps


and this

Code:
ws_plugin__s2member_during_paypal_notify_during_before_new_ccaps


seem to get called once the pay button is clicked. Awesome!

I am not sure why you would use one rather than the other? Is it maybe possible with the later to perform some logic within my system to check whether I want the purchase to proceed or not, and force the paypal payment to fail if there is some internal condition in my system not met? Just curious as to what else is possible...

Statistics: Posted by hoststreamsell — January 5th, 2012, 4:02 am


]]>
2012-01-04T20:33:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=59705#p59705 <![CDATA[Re: Equivalent hook for notification API url]]> Package s2Member\PayPal ( 197 Hooks/Filters ) list for "ws_plugin__s2member_during_paypal_notify_during_"? Will any of those hooks work for you?

Perhaps this one:
Code:
ws_plugin__s2member_during_paypal_notify_during_before_new_ccaps


Or this one:
Code:
ws_plugin__s2member_during_paypal_notify_during_new_ccaps

Statistics: Posted by Raam Dev — January 4th, 2012, 8:33 pm


]]>
2012-01-04T17:10:12-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=59668#p59668 <![CDATA[Re: Equivalent hook for notification API url]]>
Thanks!

Statistics: Posted by hoststreamsell — January 4th, 2012, 5:10 pm


]]>
2012-01-04T09:25:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=59638#p59638 <![CDATA[Re: Equivalent hook for notification API url]]> Hi Jason, only getting a chance to try this out now after the holidays. After a quick test it looks to do what I want. Thanks for the information!

Actually my mistake, it is still only the notification url that is being called. This is what I am doing in my plugin...

Code:
add_action('ws_plugin__s2member_during_paypal_notify_during_subscr_signup_wo_update_vars', 'do_paypal_ccap');

function do_paypal_ccap($vars = array()){
        $fh = fopen('/home/.sites/_default/logs/s3_log.txt', 'a');
        fwrite($fh, "do_paypal_ccap\n");
        $item_number = $vars["paypal"]["item_number"];
        $user_id = $vars["user_id"];
        fwrite($fh, "3 USER:".$user_id." ITEM:".$item_number."\n");
}

Statistics: Posted by hoststreamsell — January 4th, 2012, 9:25 am


]]>
2011-12-26T16:29:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58851#p58851 <![CDATA[Re: Equivalent hook for notification API url]]> Thanks for the heads up on this thread.

There are about 200 Hooks/Filters specifically related to IPNs and Payment Data Transfer, making it very possible to filter and/or hook into s2Member's processing routines in all sorts of creative ways.
See: viewtopic.php?f=40&t=12778&src_doc_v=111220

This is one of the most popular Hooks, and might do nicely in your scenario:
Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_signup_wo_update_vars
See: viewtopic.php?f=40&t=14521&src_doc_v=111220#src_doc_line_454

There is also this Hook, which deals with modifications, instead of initial purchases:
Code:
ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars
See: viewtopic.php?f=40&t=14521&src_doc_v=111220#src_doc_line_296

Statistics: Posted by Jason Caldwell — December 26th, 2011, 4:29 pm


]]>
2011-12-23T14:00:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58644#p58644 <![CDATA[Re: Equivalent hook for notification API url]]>
Did you find anything in the PayPal Hooks that might work for your scenario?

Statistics: Posted by Raam Dev — December 23rd, 2011, 2:00 pm


]]>
2011-12-22T17:25:15-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58560#p58560 <![CDATA[Re: Equivalent hook for notification API url]]>
I'll look at the hooks again as you suggest and see if I can find something.

Statistics: Posted by hoststreamsell — December 22nd, 2011, 5:25 pm


]]>
2011-12-22T17:07:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58555#p58555 <![CDATA[Re: Equivalent hook for notification API url]]>
If the payment is being made on PayPal's website, there won't be any way to hook into that from s2Member (since the user isn't on your site anymore, they're on PayPal's website). You might want to try hooking into the checkout process itself instead.

See the list of s2Member PayPal hooks and try searching for "checkout".

Statistics: Posted by Raam Dev — December 22nd, 2011, 5:07 pm


]]>
2011-12-22T08:39:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58486#p58486 <![CDATA[Re: Equivalent hook for notification API url]]> Statistics: Posted by hoststreamsell — December 22nd, 2011, 8:39 am


]]>
2011-12-20T17:53:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=16461&p=58320#p58320 <![CDATA[Equivalent hook for notification API url]]>
I have tried the following but it doesn't seem to fire.
add_action('ws_plugin__s2member_after_paypal_notify', 'my_method');

I have got other hooks to work once the user returns back to the website from paypal, but I would like to use the hook which fires when the payment is made just like the notification API url.

Thanks,
Gavin

Statistics: Posted by hoststreamsell — December 20th, 2011, 5:53 pm


]]>