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.
Explore seamless integrations with Post Affiliate Pro to enhance your affiliate marketing strategies. Discover solutions for e-commerce, email marketing, payments, and more, with easy integrations for platforms like 1&1 E-Shop, 2Checkout, Abicart, and many others. Optimize your affiliate network with these powerful tools.
Integrate PayPal seamlessly with Post Affiliate Pro using IPN callback to track sales and generate commissions for affiliates. Follow our simple steps to set up the PayPal IPN handling plugin and ensure your transactions are efficiently managed. Discover the benefits of streamlined affiliate management with Post Affiliate Pro today!
Google Checkout (custom field used for other data)
Easily integrate Google Checkout with Post Affiliate Pro to track sales effectively. Set up your merchant account, configure the plugin, and add tracking codes to your cart and buy now buttons. Ensure your domain is whitelisted for seamless tracking. Start optimizing your payment solutions today with our expert guidance.
Integrate 2Checkout with Post Affiliate Pro effortlessly to accept online payments and track sales. Activate the 2Checkout plugin, configure HTML sale forms, and set up INS settings for seamless operation. Enhance your affiliate program with recurring commissions and reliable tracking. Start your free trial today!
Discover seamless PayPro integration with Post Affiliate Pro, the perfect eCommerce platform for selling Software, SaaS, and Cloud Services. Easily track sales by adding tracking code to your thank you page, ensuring secure transactions via HTTPS. Explore more integrations and start your free trial today!
Discover seamless payment processing with Paymate Express on Post Affiliate Pro. Perfect for online, eBay, and mobile payments with secure ecommerce facilities. Easily configure custom value separators and integrate with your existing scripts. Trusted by the best with a 4.8/5 rating. Visit now to streamline your payment solutions!