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™

Rephrased API Question

s2Member Plugin. A Membership plugin for WordPress®.

Rephrased API Question

Postby sgtcory » May 28th, 2011, 4:31 pm

I've read the documentation for the Paypal API and custom notifications. What I would like to know, is if I am missing something - because ideally I would like to keep what I am scripting "S2 Memberfied" vice using an external notification script or another plugin in to hook into.

Is there a hook that I can use to update custom fields on subscription payments?
Webmaster Services - http://rentedweb.com
User avatar
sgtcory
Experienced User
Experienced User
 
Posts: 24
Joined: May 28, 2011

Re: Rephrased API Question

Postby Cristián Lávaque » May 28th, 2011, 5:03 pm

Could you explain a little more what you want to do? By custom field you mean the custom attribute in the shortcode? You can use PHP to change add values dynamically to the shortcode, or do you mean editing s2Member's Profile Custom Fields?
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: Rephrased API Question

Postby sgtcory » May 28th, 2011, 5:18 pm

Sure Christian -

I mean the actual database fields. What I was wondering is if there is a hook in the API notification (I have not dug too deep into the code yet), whereby I can :

- Hook into when a new - subsequent subscription payment is received. When this payment comes in, I will program in the hook to update my custom fields in the database directly.

On payment updates I wish to simply update my custom fields that I created in S2Member, and this seems like the logical way to keep it under S2 instead of adding an outside script.

Does that make sense?
Webmaster Services - http://rentedweb.com
User avatar
sgtcory
Experienced User
Experienced User
 
Posts: 24
Joined: May 28, 2011

Re: Rephrased API Question

Postby Cristián Lávaque » May 28th, 2011, 6:01 pm

You have the Payments Notification, which you can use to tell your script do what you make it do. WP Admin -> s2Member -> API / Notifications -> Payment Notifications

That said, you can try this file /wp-content/plugins/s2member/includes/classes/paypal-notify-in.inc.php and search for payment_notification.

I hope that helps.

By the way, thanks a lot for your help in the other threads, very appreciated. :)
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 2 guests

cron