PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Hook when payment process has successfully finished

s2Member Plugin. A Membership plugin for WordPress®.

Hook when payment process has successfully finished

Postby freshman66 » October 27th, 2011, 7:07 am

Hi all,
I am looking for a hook that gets triggers when a user has successfully finished a payment process - independent from type of checkout. Is there anything like that? Maybe this one:
Code: Select all
ws_plugin__s2member_during_paypal_return_during_explicit_ty_email


Thank you for your help. Cheers,
Freshman
User avatar
freshman66
Registered User
Registered User
 
Posts: 7
Joined: October 26, 2011

Re: Hook when payment process has successfully finished

Postby Cristián Lávaque » October 27th, 2011, 10:54 pm

Could you explain what you're trying to do? :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Hook when payment process has successfully finished

Postby freshman66 » October 27th, 2011, 11:10 pm

Sorry, for not beeing verbose enough :-) I need to capture the moment the user is coming back to the site to update some profile information - to be exact, I would like to track the account balance after a special post purchase. The user will the be able to use this balance to get access to certain tasks on our site. Since ww might want to implement more payment gateways (than paypal) in the future, the hook shiuld be gateway independent and provide information about the user (at least id and the amount paid.
Thank you very much for helping me out.
Cheers from Berlin, freshman
User avatar
freshman66
Registered User
Registered User
 
Posts: 7
Joined: October 26, 2011

Re: Hook when payment process has successfully finished

Postby Cristián Lávaque » October 29th, 2011, 10:19 pm

OK. Hmm... Would the Notifications API be enough for what you want? http://www.s2member.com/api-tracking-no ... ons-video/
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Hook when payment process has successfully finished

Postby freshman66 » October 31st, 2011, 5:06 am

Bum... Sorry for having wasted your time - I did watch the video before and didn't realize there was a second part. Obviously Notifications are exactly what I was looking for.
Thanks a lot,
Freshman
User avatar
freshman66
Registered User
Registered User
 
Posts: 7
Joined: October 26, 2011

Re: Hook when payment process has successfully finished

Postby freshman66 » October 31st, 2011, 3:26 pm

Ok, I am running into a problem I can't solve. As you suggested I put in a URL pointing to a custom script into "Specific Post/Page ~ Sale Notification URLs". The script works fine when I directly access it with the correct parameters.
However, as soon as I purchase the "Special Post" through PayPal (Sandbox) everything works fine, but the notification script does not get triggered. In my debug.log I find these lines which are obviously related to s2member.

Code: Select all
[31-Oct-2011 20:16:23] PHP Notice:  Undefined offset: 1 in /wp-content/plugins/s2member/includes/classes/utils-urls.inc.php on line 132
[31-Oct-2011 20:16:23] PHP Notice:  Undefined variable: cache_needs_updating in /wp-content/plugins/s2member/includes/classes/cache.inc.php on line 97
[31-Oct-2011 20:17:02] PHP Notice:  Undefined variable: cache_needs_updating in /wp-content/plugins/s2member/includes/classes/cache.inc.php on line 97
[31-Oct-2011 20:17:02] PHP Notice:  Undefined index: level-1_label in /wp-content/plugins/s2member/includes/classes/constants.inc.php on line 287
[31-Oct-2011 20:17:02] PHP Notice:  Undefined offset: 1 in /wp-content/plugins/s2member/includes/classes/utils-urls.inc.php on line 132
[31-Oct-2011 20:17:04] PHP Notice:  Undefined index: s2member_paypal_proxy in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php on line 78
[31-Oct-2011 20:17:04] PHP Notice:  Undefined index: s2member_paypal_proxy in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php on line 81
[31-Oct-2011 20:17:04] PHP Notice:  Undefined index: s2member_paypal_proxy in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php on line 84
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 1 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 2 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 3 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 4 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 5 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 6 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 7 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 8 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined offset: 9 in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php(166) : regexp code on line 1
[31-Oct-2011 20:17:04] PHP Notice:  Undefined index: s2member_paypal_proxy in /wp-content/plugins/s2member/includes/classes/paypal-notify-in-web-accept-sp.inc.php on line 183
[31-Oct-2011 20:17:04] PHP Notice:  Undefined index: HTTP_USER_AGENT in /wp-content/plugins/s2member/includes/classes/paypal-notify-in.inc.php on line 180
[31-Oct-2011 20:17:05] PHP Notice:  Undefined variable: cache_needs_updating in /wp-content/plugins/s2member/includes/classes/cache.inc.php on line 97
[31-Oct-2011 20:17:09] PHP Notice:  Undefined variable: cache_needs_updating in /wp-content/plugins/s2member/includes/classes/cache.inc.php on line 97
[31-Oct-2011 20:17:09] PHP Notice:  Undefined offset: 1 in /wp-content/plugins/s2member/includes/classes/utils-urls.inc.php on line 132


I do use W3TC, but have disabled DB caching for now. Is there any way to debug S2?
Thank you again,
Freshman
User avatar
freshman66
Registered User
Registered User
 
Posts: 7
Joined: October 26, 2011

Re: Hook when payment process has successfully finished

Postby freshman66 » November 1st, 2011, 6:28 am

I got it working now, even though I'm not sure what was wrong. The notices persist, however.
Cheers, Stefan
User avatar
freshman66
Registered User
Registered User
 
Posts: 7
Joined: October 26, 2011

Re: Hook when payment process has successfully finished

Postby Cristián Lávaque » November 2nd, 2011, 12:54 am

Glad you got it working! :)

The WP_DEBUG Constant turns on Notices from PHP, which are advisory only, NOT errors. These are designed for debugging during development. If you turn on WP_DEBUG for any application, you would always see pages full of advisory "Notices".

I hope that helps.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron