eShop (WordPress module) integration
An accessible shopping cart plugin for WordPress, packed with various features.
eShop is an accessible shopping cart plugin for WordPress, packed with various features. The integration method is used to integrate PayPal in eShop with your Post Affiliate Pro.
Integration with PayPal (step 1)
Login to your FTP, navigate to ‘wp-content/plugins/eshop/paypal/’ and edit file ‘eshop-paypal.class.php‘.
Find line:
return $echo;
and add this code above it:
/* Post Affiliate Pro integration snippet */
$echo = str_replace("name=\"notify_url\"","name=\"notify_url\" id=\"pap_ab78y5t4a\"",$echo);
$echo .= '<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('&pap_custom=');
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a');
</script>";
/* /Post Affiliate Pro integration snippet */
To make it all working, you have to enable the PayPal plugin in your Post Affiliate Pro merchant panel.
Integration with PayPal (step 2)
The next and the last step is to find this line in the same file:
function validate_ipn() {
Paste this code right below it:
/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://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 */
Do not forget to integrate the click tracking code to your Word Press.