PayPal Express Checkout (IPN and custom field used by other script) integration
The faster, safer way to send money, make an online payment, receive money or set up a merchant account.
PayPal Express Checkout integrates using IPN callback even if the callback and customfield is used by other system (e.g. shopping cart). Because of this youwill have to choose separator which will separate our and 3rd partycookie value. We will use || in this example.
Note! This is description of integration with PayPal if you use PayPalbuttons on your web pages. If you use PayPal as a processing system inyour shopping cart, use the method for integrating with shopping cart,not these steps.
Choose separator
Choose separator which will separateour and 3rd party cookie value. We will use || in this example. Youhave to configure Paypal plugin to use this separator. Go to Plugins > Paypal > Configure > Custom Value Separator.
Paypal button
Now add the following code into EVERY PayPal button form. Please make sure that the custom field you have in your button has id=”pap_ab78y5t4a”:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">PostAffTracker.setAccountId('Account_ID');
PostAffTracker.setAppendValuesToField('||');
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a');
</script>
This will ensure that referrer will be added to the custom field after the specified separator.
Integration with your IPN processing script – part 1
Now the IPN callback is pointed to your script. This callback has to beforwarded also to PAP paypal.php script, which url is http://www.yoursite.com/affiliate/plugins/PayPal/paypal.php.
In case, your paypal processing script is in PHP, you can use following code to accomplish that. You can place it at the beginning of your processing file:
/* PAP integration */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* end of PAP integration */
Integration with your IPN processing script – part 2
The custom parameter is in format 3rdPartySystemValue||PapValue. In order for 3rd party system to work correctly you need to parse 3rdPartySystemValue from the custom parameter. To do this add followingcode right after PayPal IPN verification:
<?php
$separator = '||';
if ($_POST['custom'] != '') {
$explodedCustomValue = explode($separator, $_POST['custom'], 2);
if (count($explodedCustomValue) == 2) {
$_REQUEST['custom'] = $_POST['custom'] = $explodedCustomValue[0];
}
}
?>
This is all that is required. Now whenever there’s sale, PayPal Express Checkout willuse its IPN function to call our sale tracking script, and system willgenerate commission for the affiliate.
Integrate Post Affiliate Pro with osCommerce for seamless e-commerce operations. Learn how to add integration code, divide products into campaigns, and enable direct PayPal integration. Build a custom dashboard and optimize your business with Post Affiliate Pro. Categories: E-commerce, Types: Open-source, PayPal redirect to PAP, Another integration, Direct PayPal integration with osCommerce.
BusinessDirectory (WordPress module)
Scale Lead is a nutra CPA network offering fixed commissions for affiliates interested in media and marketing. The affiliate program has campaign rules, accepted countries, and policies on explicit, religious, and political content to consider. The program supports text link banners and accepts worldwide link and banner advertisements. The affiliate manager can be contacted through Media and Marketing Mail or LinkedIn, and a free 14-day trial is available. The company also offers Post Affiliate Pro with a message sent to your email address containing login details after installation. The website uses cookies. Contact forms and live chat options are available.
OptimizePress / OptimizeMember (WordPress module)
OptimizePress is a new way to create high converting landing pages, sales pages, and membership portals. It integrates PayPal directly and involves modifying the PayPal module and activating the PayPal plugin in Post Affiliate Pro.