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.

Using Clickbank and Paypal

Home Forums Community Forum Using Clickbank and Paypal

This topic contains 4 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 8 months ago.

Topic Author Topic
Posted: Wednesday Apr 11th, 2012 at 11:22 pm #10625
DR_admin
Username: donna2012

We have two sites – site A and site B. Site A is our primary site, includes sales with Paypal pro as the payment gateway and also houses the membership portion of our site. Site B is only a sales site set up for Clickbank.

When a customer buys on Site B with the Clickbank payment, we would like Clickbank to communicate via IPN with the Site A to send the Membership Registration form. I have basic programming skills and feel comfortable implementing a normal Clickbank IPN set up – but I am concerned that bouncing from site to site (with the paypal payment method thrown in) may confuse the situation.

Is our plan compatible with the way we have our sites set up? Is there a better way to use the software to accomplish these goals? I don’t want to attempt a standard implementation of Clickbank and shut down Site A causing our members to not have access.

Thanks!

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Apr 12th, 2012 at 5:39 am #10639

Hi there.

You can do it. You’d only have s2Member installed in Site A, though. In Site A create the ClickBank order link and then use it in Site B. But the ClickBank integration would be with Site A only and it’d work fine.

In a page of Site A, use the shortcode for the CB button, log out and load the page, then copy the URL you get for the button. If you are logged in, then the URL will be linked to that account, and you don’t want that, you need to be logged out. You’ll notice it also includes the IP address of the user, so you’ll need to replace that with a bit of PHP to update the IP, instead of having yours hardcoded there. That is the URL you’d use in Site B.

I hope that helps. :)

Posted: Thursday Apr 12th, 2012 at 7:38 pm #10702
DR_admin
Username: donna2012

Thanks! That sounds pretty straightforward except the bit with replacing the php. 

Can you point me in the right direction as far as what code I should install to update the IP? That’s not something I have encountered before.

Here is the URL I am generating….

http://1.NICKNAME.pay.clickbank.net/?s2_invoice=1%3A%3A3+M&s2_p1&s2_p3&s2_desc=3+months+online+natural+birth+class+access&s2_custom=MYSITE.com&s2_customer_ip=97.93.224.9&_s2member_sig=1334294392-abd5acdf4535e2af478ac31bc2050797 

I see my IP address on there – but not sure what to replace that with.

Thanks!

  • This reply was modified 4 years, 9 months ago by  DR_admin.
Posted: Friday Apr 13th, 2012 at 2:23 am #10711
[hilite pre_code]

[/hilite]

Put that where the IP address is.

And then remember to test the link to make sure the transaction goes well and you can register an account and the right role gets set.

Posted: Friday Apr 20th, 2012 at 10:38 pm #11438
Staff Member

Thanks for bringing this thread to my attention.

Cristian and I just spoke about this.

This WAS possible in previous versions of s2Member. However, it’s NOT possible in the current release, because s2Member now uses digitally signed URLs to help prevent fraudulent transactions, and to prevent ClickBank URLs from being modified by an end-user (e.g. to prevent someone from changing the Membership Level # in the URL on their own, or from changing other important details, like term lengths).

Current versions of s2Member absolutely require that each ClickBank Button be generated by the Shortcode of the installation site; this way the URL leading to ClickBank is digitally signed by s2Member, for future authentication after a completed purchase (e.g. the IPN handler will NOT process the IPN if the original link to ClickBank was missing it’s digital signature).

Therefore, what you’ve requested is NOT possible in the current release of s2Member v120309+. I suggest that you link Site B to your sales page at Site A, where your ClickBank Button Code will be generated by the Shortcode at Site A (i.e. your actual installation of s2Member).

Another possible alternative is to create a simple script at Site A, which generates a ClickBank Button URL, using the documented output Attribute: output="url"; and then redirects a visitor automatically to the URL that is generated by the Shortcode at Site A. For instance, you might create a MUST USE plugin like this one.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php

<?php
add_action('init', 'handle_custom_clickbank_redirections');
function handle_custom_clickbank_redirections()
	{
		if(!empty($_GET&#91;'clickbank'&#93;)) // A url leading to this site, with: /?clickbank=redirect
		{
			$clickbank_checkout = do_shortcode('&#91;&#91;s2Member-Pro-ClickBank-Button ... output="url" /&#93;&#93;');
			// The Shortcode has been abbreviated here for clarity in this regard.
			// You will need to generate your own full ClickBank Button Shortcode, and set output="url".
			
			// Redirect the potential customer now to ClickBank.
			wp_redirect($clickbank_checkout); exit;
		}
	}
?>

With this MU plugin in place. Now create a link on Site B, pointing to Site A.
Site A will silently redirect the customer to ClickBank checkout.

http://yoursite.com/?clickbank=redirect
Viewing 4 replies - 1 through 4 (of 4 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.