–Hidden comment

Use attributes in format region_from and region_to= to change the languages showing in language switcher.
Available regions are:
europe_from europe_to
asia_from asia_to
mideast_from mideast_to
america_from america_to

Example:
europe_from=0 europe_to=22 will put all languages (ordered in language switcher settings) from 1 to 21 to Europe region:
asia_from=22 asia_to=25 will put all languages from 23 to 24 (so only 2) into Asia region.

s2Member (WordPress membership module)

s2Member is a WordPress plugin for professional WordPress membership management. The integration is easy, you only have to place a code to a special s2Member config section.

Place the tracking code

The first step to integrate the sale tracking code into your s2Member is to place the following code to s2Member section API / Tracking > Signup Tracking Codes:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
	PostAffTracker.setAccountId('Account_ID');
	var sale = PostAffTracker.createSale();
	sale.setTotalCost('%%initial%%');
	sale.setOrderID('%%subscr_id%%');
	sale.setProductID('%%item_number%%');

	PostAffTracker.register();
</script>

In case you need to track also some other details, you can see variables available right below this section (in s2Member).

Recurring commissions

If you want to payout recurring commissions to your affiliates, you have to enable s2Member plugin in your Post Affiliate Pro. Set a secret word there and then navigate to your s2Member admin, to API / Notifications > Payment Notifications and use this notification URL (set the secret word there):

http://URL_TO_PostAffiliatePro/plugins/s2Member/s2member.php?secret=YOURSECRETCODE&order=%%subscr_id%%&total=%%amount%%&type=order

To make this work correctly, you need to use the Recurring Commissions feature in your Post Affiliate Pro and have it set to work with API. In your campaign, you have to configure recurring commissions and set recurrence to ‘varied’ which means it will cooperate with s2Member notifications.

Register affiliates

As you can see in the s2Member plugin configuration, there is a checkbox for affiliate registrations. In case you want to create an affiliate account for every new member, you have to check the checkbox and then, in your s2Member administration navigate to API / Notifications > Signup Notifications and set this URL there:

http://URL_TO_PostAffiliatePro/plugins/s2Member/s2member.php?secret=YOURSECRETCODE&fname=%%first_name%%&lname=%%last_name%%&email=%%payer_email%%&user_ip=%%user_ip%%&type=signup

This is it, save your work and this will create a new affiliate for every new member.

Parent affiliate

In case you want to track also a parent affiliate, you have to create an additional (optional) field in your s2Member subscription form (General Options> Registration/Profile Fields) and name it ‘visitorID‘ (the same for unique field ID).

The next step is to set a custom script in Footer Design section of General Options > Login/Registration Design. Please insert this code there:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">PostAffTracker.setAccountId('Account_ID');
	document.getElementById('ws-plugin--s2member-custom-reg-field-visitorid').type = 'hidden';
	PostAffTracker.writeCookieToCustomField('ws-plugin--s2member-custom-reg-field-visitorid');
	document.getElementById('ws-plugin--s2member-custom-reg-field-visitorid').parentNode.style.display='none';
</script>

This code will make sure the parent affiliate info (a cookie value) is stored in this field, and the field itself is hidden from the form.

The last step is to add this line to your signup notification in s2Member:

&visitorID=%%visitorID%%

Refund tracking

In case you want to track refunds and automatically mark commission as refunded when it is refunded in s2Member, you have to navigate to your s2Member admin, to API / Notifications > Refund/Reversal Notifications and use this notification URL (set the secret word there):

http://URL_TO_PostAffiliatePro/plugins/s2Member/s2member.php?secret=YOURSECRETCODE&order=%%parent_txn_id%%&type=refund

That’s it, save your work.

s2member and PayPal – integration of the dynamic checkout form

If you are using PayPal as a payment gateway in s2member then a different approach of integration is needed.

First of all, into the notify_url field of each ‘checkout’ button (‘paypal-checkout-button.php’,’paypal-sp-checkout-button.php’, etc. ) found at:

/wp-content/plugins/s2member/includes/templates/buttons/

you have to add:

id="pap_ab78y5t4a" 

Example:

If the default notify_url field code looks like this:

 <input type="hidden" name="notify_url" value="%%notify_url%%" />

then change it to this one:

 <input id="pap_ab78y5t4a" type="hidden" name="notify_url" value="%%notify_url%%" />

Afterwards, into the footer file of your current theme, so into

/wp-content/themes/Name_Of_Your_Current_Theme/footer.php

you have to add the following code:

<!-- PAP Integration snippet -->
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('default1');
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a', '', 'pap_custom');
</script>
<!-- /PAP Integration snippet -->

In case you wanted to track a product ID as well, add this attribute to your s2Member PayPal form code:

item_number="someProductID"

s2member and PayPal – forwarding PayPal’s instant payment notification to Post Affiliate Pro

The last step of the integration is to look up the following file:

/wp-content/plugins/s2member/includes/classes/paypal-notify-in.inc.php

and find the line:

public static function paypal_notify() {

and place the following code right below it:

/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php?pap_custom='.$_GET['pap_custom']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* /Post Affiliate Pro integration snippet */

That’s it.

Now, log in to the merchant panel of Post Affiliate Pro (Network), navigate to the “Plugins” section and activate the “PayPal IPN Handling” plugin.

NOTE: If you wish the paying customer to be automatically created as an affiliate, then in the ‘PayPal IPN Handling’ plugin turn on the “Register new affiliate with every occured event” option.

NOTE2: The ‘PayPal IPN Handling’ automatically handles the refunds — if a previously tracked transaction (that resulted in a commission) is refunded in PayPal, then it will be automatically refunded in Post Affiliate Pro (Network) as well.

Back to Integrations Create account for FREE
Would you like to improve your affiliate software even more? Check out the CoreCommerce for Post Affiliate Pro.

CoreCommerce

Would you like to improve your affiliate software even more? Check out the CoreCommerce for Post Affiliate Pro.

Would you like to improve your affiliate software even more? Check out the Miva 9 integration for Post Affiliate Pro.

Miva 9

The article discusses how to integrate PostAffiliate Pro with Miva 9, an online store management solution, to enable click and sale tracing. It provides instructions for adding click tracking code and sale tracking code (per order tracking or per product tracking) to Miva admin panel, and includes a code snippet for tracking sales. The article also highlights related resources and invites readers to create a free account on PostAffiliate Pro.

Would you like to improve your affiliate software even more? Check out the aMember integration for Post Affiliate Pro.

aMember

The article discusses the integration of PostAffiliate Pro with aMember, specifically for versions lower than v4. It covers the integration of recurring sales with PayPal, signup form integration, and provides the necessary code for each integration. The article also mentions other software such as AspDotNetStorefront and OpenCart, which can be integrated with PostAffiliate Pro. Overall, the article emphasizes the ease of integrating different software with PostAffiliate Pro and encourages readers to create a free account to try it out.

Would you like to improve your affiliate software even more? Check out the Foxy Cart integration for Post Affiliate Pro.

Foxy Cart

The given text discusses various integration options available for Foxy Cart, including login integration, coupon tracking, and tracking each product as a separate transaction. These options can be integrated with PostAffiliate Pro to track transactions and sales data. The text provides step-by-step instructions for each integration option, including the necessary code to be inserted. The article also mentions that a free account can be created on PostAffiliate Pro to start using these integrations.

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.

×

Schedule a one-on-one call and discover how Post Affiliate Pro can benefit your business.

We’re available on multiple dates

Schedule a call