PayPal integrates using IPN callback.
Note! This is description ofintegration with PayPal if you use PayPal buttons on your web pages. Ifyou use PayPal as a processing system in your shopping cart, use themethod for integrating with shopping cart, not these steps.
Also,make sure you don't already use PayPal IPN for another purpose, such assome kind of digital delivery or membership registration.
To integrate with PayPal, you have to turn on the PayPal IPN handling plugin in the merchant panel of Post Affiliate Pro (Network) in the 'Plugins' section. Then follow the steps below.
Now add the following code into EVERY PayPal button form
This will tell PayPal that it should silently call http://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php script upon every sale, and it will pass all sale variables including the custom field to this script.
Note: If you have more buttons at one page, you should use only the custom field code in each button. The script tag should be inserted only once per page.It even doesn't need to be in the button form, it can be somewhere in the body of the page. (click tracking is per page (have to be above all buttons), "custom" field is per button, "notify_url" is per button too ... PAP4 script calling notifysale.php is per page - have to be below all buttons)
Using PayPal links
If you use just simple PayPal links like:
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MWU1Y4K24N3HY">Click here to order</a>
then you have to skip the above given steps and do the integration the following way:
- into each link add: id="paypallink"
so the link would look like this:
<a <u>id="paypallink"</u> href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MWU1Y4K24N3HY">Click here to order</a>
<!-- Post Affiliate Pro Integration snippet --> <script> PostAffTracker.writeCookieToLink('paypallink', 'custom'); </script> <!-- /Post Affiliate Pro Integration snippet -->NOTE: The PayPal links must be in your page somewhere above the <!-- PAP Integration snippet --> line.
There is one last step behind and that is to set your PayPal's Notification URL to point to the PayPal Ipn Handling plugin of Post Affiliate Pro (Network).
So, log in to your PayPal account, navigate to Profile > Selling Preferences > Instant Payment Notification Preference, click 'Edit settings', enable the IPN messages by selecting 'Recieve IPN messages (Enabled)' and set the Notification URL to: