PayU is the main online payments processor in Romania and it offers a secure, fast and simple way to accept online payments for any type of products and services for online shops. With the integration method you can track product IDs (per product integration), total cost, order ID, currency and coupons.

1.

Insert the sale tracking code

The only step is to place the sale tracking code to Marketing> After Sale Messages> After Sale Messages.

There is a section Text where you are supposed to place the sale tracking code. If you already have some code/message there, just add the sale tracking code to the end of the section.

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript">
</script>
<script type="text/javascript">
var sale = PostAffTracker.createSale();
sale.setTotalCost(myOrder.totalPrice - myOrder.tax - myOrder.shipping);
sale.setOrderID(myOrder.refNo);
sale.setCurrency(myOrder.currency);
PostAffTracker.register();
</script>

Save your work and you are done.

2.

Per product tracking

If you want to track per product commissions, please use the following code instead the one from the first step.

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript">
</script>
<script type="text/javascript">
for (i=0; i< myOrder.productsInOrder.length; i  ){
var sale = PostAffTracker.createSale();
sale.setTotalCost(myOrder.productsInOrder[i].quantity * myOrder.productsInOrder[i].price);
sale.setOrderID(myOrder.refNo   '('   (i 1)   ')');
sale.setProductID(myOrder.productsInOrder[i].id);
sale.setCurrency(myOrder.currency);
PostAffTracker.register();
}
</script>

In case you want to track also coupon codes, add this line to your sale tracking code (e.g. under the line with setCurrency):

sale.setCoupon(myOrder.productsInOrder[i].coupon);

Do not forget to integrate your site with the click tracking code to make it working.

Notice:

Make sure your Post Affiliate Pro is installed on a server with an SSL support (https). PayU requires all scripts to be called in a secure way, so your Post Affiliate Pro has to be behind an SSL.