latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Intergrating s2members with WSO Pro

Home Forums Community Forum Intergrating s2members with WSO Pro

This topic contains 11 replies, has 5 voices. Last updated by  Kezz Bracey 4 years, 9 months ago.

Topic Author Topic
Posted: Friday Mar 23rd, 2012 at 2:00 am #8873

Hey does anybody now how to integrate s2member with WSO pro? So that when the paying customer is redirected back to the membership site from paypal s2member recognizes that the customer has paid and sends them to the registration page. At the moment all customers who are paid or not that are coming from WSO pro taken to paypal and sent to our site are being taken to the sales page and can’t get access to register. Its like our site or s2member does not know that they have paid to become a member. The only way we can let them in is to add them manually inside the site.

I think there must be a key or code that has to be in place which is fine if someone could help out as to what that code must be. Or if anybody else has had the same difficulties any kind of help would be super.

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Friday Mar 23rd, 2012 at 12:34 pm #8924
Raam Dev
Username: Raam
Staff Member

Hi Ryan,

s2Member sets a cookie in the user’s browser after they’ve successfully made a payment. If you have Open Registration disabled (Dashboard -› s2Member® -› General Options -› Open Registration), that cookie must be present to allow them access to the registration page. If Open Registration is enabled, anyone can visit the registration page.

With the regular s2Member payment buttons, s2Member generates an email after registration (Dashboard -› s2Member® -› PayPal® Options -› Signup Confirmation Email) that contains a special link to register. That link sets the cookie and then redirects them to the registration page.

If you want to manually generate those cookies, you’ll need to dig into the s2Member code and go from there (all of the source code is available for both the free and Pro version of s2Member). This is outside the scope of our support policy (please see s2Member® » Support Policy » Fine Lines), so you’d need to make that custom integration on your own.

Posted: Friday Mar 23rd, 2012 at 4:44 pm #8951

Hi Ryan.

I saw Jason replied your email about this. In case you didn’t get it, here’s what he said:

It’s true that s2Member’s Proxy IPN URL could be used for this. However, it’s NOT usually just that easy, unfortunately. As mentioned in the administrative panel for s2Member, there are two fields that MUST match what s2Member expects to see. The custom value in any PayPal IPN response (forwarded, or otherwise), must always match the installation domain for your s2Member-powered site. Also, the item_number field must also match a Membership Level #.

For further details, please check your Dashboard under: [hilite path]s2Member -> PayPal Options -> IPN Integration -> Proxy URL[/hilite].

Given the issue that I just mentioned, most site owners integrating s2Member in this way, will implement a proxy of their own, on top of s2Member’s Proxy URL. In this way, your server would receive a forwarded IPN response through a small custom script that you write. That script would add the variables that s2Member needs (modifying the original IPN slightly), and then sending everything to s2Member’s Proxy IPN URL handler.

As an s2Member Pro customer, you have access to the [hilite mono]/[/hilite] file, which contains an example script called: [hilite mono]central-ipn-sample.php[/hilite]. While that’s not exactly what you’re looking for, many of our customers have used that script as a good starting point for building such an integration as you’ve described. You’ll find this example file inside the [hilite mono]/[/hilite] file, through your account at

I hope it helps!

Posted: Friday Mar 23rd, 2012 at 7:06 pm #8975

Thanks for your help guys I will do my best and see how it goes:))


Posted: Friday Mar 23rd, 2012 at 8:37 pm #8979

Ok, I have looked and looked, I even used the search function to try and find it can you please show me where this is….


I have a coder ready to move on this with your instructions given here

If you can please show me exactly where is is located?



Posted: Friday Mar 23rd, 2012 at 10:32 pm #8988

Go to your Account page here:

and look under the subheading [hilite path]My Additional File Downloads[/hilite]. :)

Posted: Sunday Mar 25th, 2012 at 2:04 am #9025

Ok guys sorry to be a pain in the but. I have the file now and I just wanted to be clear on things before I go ahead and try and fix this.

$config = /* One line for each domain (follow the examples here please). */ array
		"" => "",
		"" => "",

So in this part here “[YOUR DOMAIN]” => “[FULL URL TO AN IPN HANDLER FOR YOUR DOMAIN]” do I put the URL of my domain first and then the url of WSO Pro IPN handler in the second part??


Posted: Tuesday Mar 27th, 2012 at 6:17 am #9195
Staff Member

Regarding that central IPN example file…
you might transform it a bit and do something like this.

1. Configure the top of this file (as seen below).
2. Upload this file to your server.
3. Configure your 3rd party integration to forward IPNs to this script.

Result… this script will receive IPNs being forwarded from your 3rd party integration. This script modifies important variables such as “custom” and “item_number” to a format that s2Member can understand. This script will then forward the IPN again (after having modified it a bit), over to your actual s2Member installation.

---- Configuration. -------------------------------------------------------------------------------------------------------*/

/* s2Member installation domain. */
$config&#91;"custom"&#93; = "";

/* s2Member Membership Level# */
$config&#91;"item_number"&#93; = "1";

/* s2Member Proxy IPN URL handler. */
$config&#91;"proxy_ipn_handler_url"&#93; = /* You'll get this from Dashboard: `s2Member -> PayPal Options -> IPN Integration -> Proxy IPN URL`. */

---- Do NOT edit anything below, unless you know what you're doing. --------------------------------------------------------*/
header("HTTP/1.0 200 OK");
header("Content-Type: text/plain; charset=utf-8");
eval /* Clean buffers. */('while (@ob_end_clean ());');

if( /* No ``$_POST`` vars? */empty($_POST) || !is_array($_POST))
	exit /* Exit now. There is nothing to process. */();
$_p = (get_magic_quotes_gpc()) ? stripslashes_deep($_POST) : $_POST;
$_p = trim_deep /* Now trim this array deeply. */($_p);

$_paypal_ipn_server_ip = $_ip = /* Forge IP address to match the PayPal® IPN server here. */ "";
/* See list of IPs here: <>. */

$_p["custom"] = $config["custom"]; $_p["item_number"] = $config["item_number"];
echo (trim(curlpsr($config["proxy_ipn_handler_url"], http_build_query($_p, null, "&"), 20, 20, array("REMOTE_ADDR: ".$_ip, "HTTP_X_FORWARDED_FOR: ".$_ip))));

unset($_paypal_ipn_server_ip, $_ip);
---- Do NOT edit anything below, unless you know what you're doing. --------------------------------------------------------*/
function trim_deep($value = FALSE)
		return is_array($value) ? array_map("trim_deep", $value) : trim((string)$value);
function stripslashes_deep($value = FALSE)
		return is_array($value) ? array_map("stripslashes_deep", $value) : stripslashes((string)$value);
function curlpsr($url = FALSE, $post_vars = array(), $max_con_secs = 20, $max_stream_secs = 20, $headers = array())
		if(($url = trim($url)) && ($curl = curl_init()))
				if /* Because cURL can't deal with complex arrays. */(is_array($post_vars))
					$post_vars = http_build_query($post_vars);
				$follow = (!ini_get("safe_mode") && !ini_get("open_basedir"));
				curl_setopt_array($curl, array(CURLOPT_URL => $url, CURLOPT_POST => true, CURLOPT_CONNECTTIMEOUT => $max_con_secs, CURLOPT_TIMEOUT => $max_stream_secs, CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $post_vars, CURLOPT_FOLLOWLOCATION => $follow, CURLOPT_MAXREDIRS => (($follow) ? 5 : 0), CURLOPT_ENCODING => "", CURLOPT_VERBOSE => false, CURLOPT_FAILONERROR => true, CURLOPT_FORBID_REUSE => true, CURLOPT_SSL_VERIFYPEER => false));
				$o = trim(curl_exec($curl));
		return (!empty($o)) ? $o : false;
Posted: Tuesday Mar 27th, 2012 at 6:20 pm #9303

Ok guys I have tried it all now and still have had no luck. I’m out of ideas!! Ive read through the forums I’ve done the things you have stated above Ive even sent all my details through the private members area and still cannot get it to work. I am at a loss now. I was adding members manually but now the affiliates are getting sales it is making this process exrteemly hard. Should I just start again with a different system like DAP or something.? I would like to stay with s2members because I think its awesome but if does not work for me then I dont know what to do


Posted: Wednesday Mar 28th, 2012 at 2:49 pm #9357

Hey Ryan,

I can’t help with the WSO Pro question, but it might interest you to know JVZoo has been working on an integration with s2Member.

I know a lot of WSO Pro users have been using JVZoo lately so you might want to ping them a question over at their site and see how they are progressing with their integration, as if they are close it might be the easiest way to get WSO customers setup as members.

Posted: Thursday Mar 29th, 2012 at 12:10 am #9423

Ok thank you Kez for your help I think I might get onto that now before I bump the thread.


Posted: Thursday Mar 29th, 2012 at 5:54 pm #9491

If you could come back to this thread and post what you find out that would be awesome as I’d like to know myself, and I’ve seen quite a few others asking as well.

I did see they have a field in their product setup page labelled “For use with s2Member” so hopefully that’s a good sign.


Viewing 11 replies - 1 through 11 (of 11 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.