Offsite ClickBank buttons

There may be times when you need to have the ClickBank order button in a site other than the one where you have s2Member protecting the content. In those cases the button shortcode will not work, and using a regular ClickBank button won't integrate with s2Member to grant access to the content after checkout.

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).

Some have tried using the shortcode to create the button's code, and then copied this output code and pasted it elsewhere. This won't work either, because the variables need to be updated each time and that's done with the shortcode.

Current versions of s2Member absolutely require that each ClickBank button be generated each time by the shortcode on the site with s2Member. 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).

I suggest that you link Site B to your sales page at Site A (i.e. your actual installation of s2Member), where your ClickBank button code will be generated by the s2Member shortcode at Site A.

Another possible alternative is to create a simple script at Site A, which generates a ClickBank button URL and redirects the person there. For instance, you might create a must-use plugin like this one:

Create this directory and file:
/wp-content/mu-plugins/s2hacks.php
See: http://www.s2member.com/kb/hacking-s2member/

<?php
add_action('wp_loaded', 'handle_custom_clickbank_redirections');
function handle_custom_clickbank_redirections() {
  if(isset($_GET['clickbank'])) {
    $clickbank_checkout = do_shortcode('[s2Member-Pro-ClickBank-Button ... output="url" /]');
    wp_redirect($clickbank_checkout);
    exit;
  }
}

The shortcode in the code above has been abbreviated here for clarity. You will need to generate your own full ClickBank Button Shortcode, and set output="url". WP Admin -> s2Member -> ClickBank Buttons

With this must-use 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

One response to “Offsite ClickBank buttons”

  1. roy says:

    When you say " suggest that you link Site B to your sales page at Site A (i.e. your actual installation of s2Member), where your ClickBank button code will be generated by the s2Member shortcode at Site A.

    what do you mean by "link"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.