PremiumWebCart IPN integration integration
PremiumWebCart IPN is a very useful utility, which enables you not only to track transaction data, but also customer details.
Create custom product/bundle links
In PremiumWebCart admin, navigate to Cart Setting > Advance Integration > Pre-populating Checkout Page and read instructions on how to generate a product link, and based on the instructions, get product/bundle ID.
The final link should look like this:
http://www.secureinfossl.com/?con=my_cart&met=addToCart&pid=3579782e28686ed437113e7038a0a7c9
Using the following code, you can create a “Buy Now” link, presetting up custom1 field with tracking value:
<a href="http://www.secureinfossl.com/?con=my_cart&met=addToCart&pid=3579782e28686ed437113e7038a0a7c9"
id="affCookieLinkId">Buy Now</a>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.writeCookieToLink('affCookieLinkId', 'custom1');
</script>
As you can see, there is a special ID in the link (id=”affCookieLinkId”) – this is needed. You have to add it to the link, otherwise the tracking won’t work.
Remember the link in the code is just an example, use your own one. In case you already use custom1 field for something else, you can use other custom fields – up to 5.
Setup the IPN URL
Next step is to setup the URL where IPN notifications will be sent to. It is URL of your Post Affiliate Pro plugin:
https://URL_TO_PostAffiliatePro/plugins/PremiumWebCartIPN/pwcipn.php
Navigate to Cart Setting > Advance Integration > PWC IPN and enter the URL into the field. Do not forget to save it.
Enable the plugin
The last step is to enable your “Premium Web Cart IPN handling” plugin in your Post Affiliate Pro. Configure it in case you want to create an affiliate account right after successful payment, or in case you want to handle orders in a special way.
Do not forget to integrate your site with the click tracking code, so the sale tracking can work.