Language switcher

#languages]

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

Integrations

Maximize the value of your existing affiliate marketing software and extend its possibilities with a wide range of integrations, plugins and apps. All built to improve the strong foundations of Post Affiliate Pro.

aMember

Accept membership payments, manage profiles, deliver digital content, integrate with your blog, CMS, send newsletters, run affiliate program with this software.

This integration method is for aMember versions lower than v4.

Integration with aMember uses a variation of General solution, it tracks sales by invoking hidden script from “thank you” page.

Integration

Put the following code to the aMember thanks.html page:

{$TrackingScript}
<script type="text/javascript">{$SetAccountJs}
{$CreateSaleJs}
sale.setTotalCost('{$payment.amount}');
sale.setOrderID('{$payment.payment_id}');
sale.setProductID('{$payment.product_id}');
{$ExtraDataJs}
PostAffTracker.register();
</script>

2. Integration of recurring sales with PayPal

If you want to integrate aMember with PayPal recurring payments then follow these instructions. You will have to find the paypal_r.inc.php on your server /amember/plugins/payment/paypal_r

Insert next code right after this line:
function paypal_validate_ipn($vars){

/* {$PapAbbr} integration */
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, "{$HttpProtocol}{$BaseUrl}/plugins/PayPal/paypal.php");
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
 curl_exec($ch);
/* end of {$PapAbbr} integration */

Now find this line (2x times):

'custom' => '',

and change them to:

'custom' => $_COOKIE['{$PapAbbr}VisitorId'],

Notice, that your cookies must be available at the domain where amember is installed in order to track sales.

3. Signup form integration

It’s possible to integrate Amember in way, that every new user signup will create also affiliate account in your PAP in the same time. This integration is using our API, therefore it’s necessary to upload PapApi.class.php into your Amember main folder. Then locate file signup.php (also in the main folder), open it in some text editor and add following code right after this line:

proceed_to_payment($payment_id, $member_id_exists);

require("PapApi.class.php");
          try {
                $session = new Gpf_Api_Session("https://URL_TO_PostAffiliatePro/scripts/server.php");
                if(!$session->login("merchant_username", "merchant_password")) {
                    return;
                }
                $affiliate = new Pap_Api_Affiliate($session);
                $affiliate->setUsername($_POST['email']);
                $affiliate->setRefid($_POST['login']);
                $affiliate->setPassword($_POST['pass0']);
                $affiliate->setFirstname($_POST['name_f']);
                $affiliate->setLastname($_POST['name_l']);
                if(!$affiliate->add()) {
                    //echo "Cannot save affiliate: ".$affiliate->getMessage();
                    return;
                } else {
                    // affiliate was successfully added
                }
            } catch(Exception $e) {
                //echo "Error while communicating with PAP: ".$e->getMessage();
                return;
            }

This is all that is required. Now whenever there’s sale, aMember will call our sale tracking script, and system will generate commission for the affiliate.

Back to Integrations Create account for FREE

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