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™

HELP! S2Member not passing Affiliate ID for Authorize.net?

s2Member Plugin. A Membership plugin for WordPress®.

HELP! S2Member not passing Affiliate ID for Authorize.net?

Postby jlamarferren » September 16th, 2011, 8:30 am

Hello,

I purchased a plugin called WP Affiliate Platform and it is supposed to be integrated with S2 Member. As we started promoting our program, we noticed that we were getting sales, but that our affiliates were not. They were showing many clicks, but 0 sales. I contacted the developer for the WP Affiliate Platform plugin and when he looked at our set up here is what he would like me to ask the S2 Member developers:

When using the authorize.net gateway, does the S2Member plugin send the Affiliate ID when sending the IPN notification like it does for PayPal transactions?

Also, they wanted me to mention the following documentation so the S2 Member developers can easily catch up and will know what we are talking about:
http://www.tipsandtricks-hq.com/wordpre ... ftware-368

Please help with this. This is the last piece we need and we want to be able to compensate our affiliates for their hard work.
Last edited by jlamarferren on September 19th, 2011, 6:48 pm, edited 1 time in total.
User avatar
jlamarferren
Registered User
Registered User
 
Posts: 30
Joined: August 26, 2011

Re: S2 Member not passing Affiliate ID for Authorize.net?

Postby jlamarferren » September 19th, 2011, 6:47 pm

Can one of the developers please take a look at this?
User avatar
jlamarferren
Registered User
Registered User
 
Posts: 30
Joined: August 26, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby sgtcory » September 19th, 2011, 7:47 pm

Do you have a link to your site you can share?

Also, you need to be sure you are pipe delimiting your shortcode :

%%cv1%% = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: custom="www.yoursitehere.com|cv1|cv2|cv3". You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.


The way I understand this is that you would pass the affiliateID like so in your shortcode :

custom="www.yourdomainhere.com|ap_id"

You would replace ap_id with the variable for ap_id so it will populate the CV1 field.

Tx
Last edited by sgtcory on September 27th, 2011, 11:31 pm, edited 1 time in total.
Webmaster Services - http://rentedweb.com
User avatar
sgtcory
Experienced User
Experienced User
 
Posts: 24
Joined: May 28, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby jlamarferren » September 19th, 2011, 11:04 pm

I'll have the developer give this a try on WP Affiliate's end. Thanks
User avatar
jlamarferren
Registered User
Registered User
 
Posts: 30
Joined: August 26, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby jlamarferren » September 20th, 2011, 9:05 am

Oh and here is the link to my site. http://www.leasepurchaselocators.com
User avatar
jlamarferren
Registered User
Registered User
 
Posts: 30
Joined: August 26, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby tipsandtricks_hq » September 20th, 2011, 9:15 pm

Hi, We use the following action hook to add the "Affiliate ID" in the custom field for PayPal checkout (this was suggested by Jason):

ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts

Is there a similar hook present for the Authorize.net checkout of the S2Member that we can utilize to add the affiilate ID to the "custom" field programmatically?
User avatar
tipsandtricks_hq
Registered User
Registered User
 
Posts: 3
Joined: September 20, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby scripteralex » September 23rd, 2011, 12:38 pm

Is there a workaround for this? We recently switched off the free version to Pro to get authorize.net (and lower our payment processing cost) and now our affiliates are getting furious that their aren't getting credit.
User avatar
scripteralex
Registered User
Registered User
 
Posts: 8
Joined: September 22, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby Cristián Lávaque » September 24th, 2011, 10:51 pm

tipsandtricks_hq wrote:Hi, We use the following action hook to add the "Affiliate ID" in the custom field for PayPal checkout (this was suggested by Jason):

ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts

Is there a similar hook present for the Authorize.net checkout of the S2Member that we can utilize to add the affiilate ID to the "custom" field programmatically?


Did you try the same hook with authnet instead of paypal? ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts

viewtopic.php?f=40&t=12475&p=30895&hilit=ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts#src_doc_ws_plugin__s2member_pro_before_sc_authnet_form_after_shortcode_atts
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: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby tipsandtricks_hq » September 25th, 2011, 3:09 am

Thank you... I will try this hook.
User avatar
tipsandtricks_hq
Registered User
Registered User
 
Posts: 3
Joined: September 20, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby Jason Caldwell » September 27th, 2011, 1:50 pm

Hi there. Thanks for the heads up on this thread. It looks like we need to provide you with a solution that works across all Payment Gateways integrated with s2Member and s2Member Pro. Here is a code sample that should do just that. Please let me know if you have any trouble with this.

Code: Select all
<?php
function s2_wp_affiliate_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"];
        $s2_wp_affiliate_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"] = $existing_config . $s2_wp_affiliate_tracking_codes;
    }
if(!
is_admin()) add_action ("plugins_loaded", "s2_wp_affiliate_tracking_codes");
?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby tipsandtricks_hq » September 27th, 2011, 10:40 pm

This option looks even better. Just to be clear... so the content of the following variable will get executed after a signup or a member payment?

$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"]

And we can use the following variables (values dynamically replaced from the actual transaction)?

%%cv1%%
%%amount%%
%%payer_email%%
User avatar
tipsandtricks_hq
Registered User
Registered User
 
Posts: 3
Joined: September 20, 2011

Re: HELP! S2Member not passing Affiliate ID for Authorize.ne

Postby Jason Caldwell » October 1st, 2011, 4:16 pm

Thanks for the follow-up.

This code sample that I posted works ONLY for Signups.
i.e. The initial purchase, which might be for $0.00 if a 100% free trial was offered.
It does NOT get called upon for future recurring payments, only for the initial Signup.
( this works for all Payment Gateways, in one go )
Jason Caldwell wrote:
Code: Select all
<?php
function s2_wp_affiliate_signup_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"];
        $s2_wp_affiliate_signup_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"] = $existing_config . $s2_wp_affiliate_signup_tracking_codes;
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_signup_tracking_codes");
?>


Available Replacement Codes inside a Signup Tracking Code pixel:
See: s2Member -> API Tracking -> Tracking Codes
SNAG-0009.png



In addition, s2Member supports a feature called Specific Post/Page Access, where specific Posts/Pages can be sold apart from any Membership to the site, and separate Tracking Codes can/should be integrated for that type of sale. ( this works for all Payment Gateways, in one go )
Jason Caldwell wrote:
Code: Select all
<?php
function s2_wp_affiliate_sp_tracking_codes 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_tracking_codes"];
        $s2_wp_affiliate_sp_tracking_codes = '<img src="/track.php?aid=%%cv1%%" />'; /* Add tracking code(s) here dynamically; the SAME way a site owner
        would do it manually through `s2Member -> API Tracking` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_tracking_codes"] = $existing_config . $s2_wp_affiliate_sp_tracking_codes;
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_sp_tracking_codes");
?>


Available Replacement Codes inside a Specific Post/Page Tracking Code pixel:
See: s2Member -> API Tracking -> Tracking Codes
SNAG-0010.png





Now, in addition to s2Member's "Tracking Code" integration, there is another way of integrating your affiliate software, and that is through s2Member's event driven API Notifications. This type of integration might be more desirable if you plan to track recurring payments as well. For instance, instead of integrating Tracking Codes, your application may prefer to integrate with s2Member's Payment Notification, processed silently behind-the-scene, anytime an actual payment is received; and this DOES include future recurring payments too. ( this also works for all Payment Gateways, in one go )

Here are code samples for this type of integration, covering both Membership and Specific Post/Page functionality. For further details, see: Dashboard -> s2Member -> API Notifications.
Code: Select all
<?php
function s2_wp_affiliate_membership_payment_tracking_urls 
() /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_urls"];
        $s2_wp_affiliate_membership_payment_tracking_urls = 'http://example.com/track.php?user_ip=%%user_ip%%&payer_email=%%payer_email%%&amount=%%amount%%&aid=%%cv1%%';
        /* Add tracking URL(s) here dynamically; the SAME way a site owner would do it manually through `s2Member -> API Notifications -> Payment Notifications` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_urls"] = trim ($existing_config . "\n" . $s2_wp_affiliate_membership_payment_tracking_urls);
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_membership_payment_tracking_urls");

function s2_wp_affiliate_sp_sale_tracking_urls () /* Works for ALL Payment Gateways in one go. */
    {
        $existing_site_owner_config = (string)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_urls"];
        $s2_wp_affiliate_sp_sale_tracking_urls = 'http://example.com/track.php?user_ip=%%user_ip%%&payer_email=%%payer_email%%&amount=%%amount%%&aid=%%cv1%%';
        /* Add tracking URL(s) here dynamically; the SAME way a site owner would do it manually through `s2Member -> API Notifications -> Specific Post/Page Sale Notifications` in the Dashboard. Replacement Codes are listed in the Dashboard with s2Member. */
        $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_urls"] = trim ($existing_config . "\n" . $s2_wp_affiliate_sp_sale_tracking_urls);
    }
if (!is_admin ()) add_action ("plugins_loaded", "s2_wp_affiliate_sp_sale_tracking_urls");
?>

Replacement Codes for s2Member's Payment Notification.
SNAG-0012.png

Replacement Codes for s2Member's Specific Post/Page Sale Notification.
SNAG-0011.png
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron