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™

add to group on registration - redux

s2Member Plugin. A Membership plugin for WordPress®.

add to group on registration - redux

Postby kipprsnak » April 22nd, 2011, 4:55 pm

I have seen a few posts on this, and I'm just wondering if anyone has a lead on how to implement this. I don't even know where to start.

I'm assuming that the information coming back from PayPal will include membership level and custom capabilities information. How do I get at that information in generate a variable that I can use with I have found to add users to group on registration:

Code: Select all
//Automatically add new users to a group
function automatic_group_membership( $user_id ) {
if( !$user_id ) return false;

groups_accept_invite( $user_id, <# group ID #> );
}
add_action( 'bp_core_activated_user', 'automatic_group_membership' );



Now I want to add a variable coming from paypal. I just don't know how to find it (assuming the above works).


Any help super appreciated. Thanks
User avatar
kipprsnak
Registered User
Registered User
 
Posts: 13
Joined: May 7, 2010

Re: add to group on registration - redux

Postby kipprsnak » April 22nd, 2011, 4:56 pm

User avatar
kipprsnak
Registered User
Registered User
 
Posts: 13
Joined: May 7, 2010

Re: add to group on registration - redux

Postby Cristián Lávaque » April 22nd, 2011, 5:05 pm

I suggest you take a look at the $_GET and $_POST arrays (or just $_REQUEST) after the person returns from PayPal, I'm guessing you could find there what you want.

print_r the array and see if it's there, feel free to post the array here too (xxxx out any data that shouldn't be made public).

Let me know if 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

Re: add to group on registration - redux

Postby kipprsnak » April 22nd, 2011, 5:19 pm

I'm sorry, I'm just a little untechnical. AGAIN awesome with the response time.

What I mean is, where is paypal sending that information? I looked into my settings and I see a S2member_paypal return variable... what page/script/class is actually receiving the information in S2Member. If that makes sense. Where does a person "go" after they return from PayPal?
User avatar
kipprsnak
Registered User
Registered User
 
Posts: 13
Joined: May 7, 2010

Re: add to group on registration - redux

Postby Cristián Lávaque » April 22nd, 2011, 5:52 pm

Well the data is sent to s2Member by PayPal via IPN (Instant Payment Notification) to the URL you entered for the IPN setting in PayPal when you set everything up. And this data is sent via $_POST, so if you look at the array you may see what's there.

The person will be returned to the registration page on a new buy, for example, not exactly sure where on a modification. That said, if you use s2Member Pro's Pro-Forms, you can specify what URL to the the person after a successful checkout. WP Admin -> s2Member -> PayPal Pro-Forms -> Custom Return URLs on Success

If this gets too advanced for you, you can try a freelance developer to help you set your customization up. viewforum.php?f=37


kipprsnak wrote:AGAIN awesome with the response time.


Thank you. :)

I know how important it can be for you guys to have a quick reply to these problems, with what can be on the line, especially with deadlines or even live websites. So I try to reply as soon as possible, I can't always do it as soon as I like to, but I try.

I don't have all the answers, but sometimes I do help find the problem anyway, and if I don't then I go to Jason and he usually is back with his feedback later that day or within the 48hs usually.
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