PayU (PagosOnline) integration
This integration is for payment buttons of gateway called PayU (former PagosOnline). The integration is achieved by using extra field and notification URL.
The notifications are handled by PayU PagosOnline plugin, which you have to activate in Post Affiliate Pro merchant panel, in Plugins section.
Modify your button
The integration is performed by adding an extra code to your existing button, so there has to be one already placed somewhere at your website. The gateway allows you to use two extra fields. If you already use both of them for other purpose, please skip to step 2.
Using the unused extra field (extra1, extra2 or extra3), add this code to your button code:
<input type="hidden" name="extra1" value="" id="pap_dx8vc2s5" />
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
In case you are using more than one button at the same page, please the script code only once at the page. You will decrease page load that way.
In case you already use both extra fields
In case you already use all extra fields, you have to use different approach instead of the one from step 1 – add id=”pap_ab78y5t4a” to an existing extra data field and then add this code to the button (once per page):
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAppendValuesToField('||');
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a');
</script>
Make sure you define the same extra data number in your plugin and also the same separator value. As you can see, in this example we are using double pipe: ||.
Notification URL
If your button is already using a parameter confirmationUrl then you can skip this step.
Add this code to your button:
<input type="hidden" name="confirmationUrl" value="https://URL_TO_PostAffiliatePro/plugins/PagosOnline/pagosonline.php" />
If you skipped step 3
If you skipped step 3 it means you already have the notification URL defined in your button. To make sure all response data will be sent to your Post Affiliate Pro plugin, edit the file which confirmationUrl points to. Add this code to the place which is processed in the file as first:
/* PAP integration */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://URL_TO_PostAffiliatePro/plugins/PagosOnline/pagosonline.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* end of PAP integration */
In case you followed step 2
In case you followed step 2, it means you are already using extra fields for other applications. The final step is to ensure your application will not use data which Post Affiliate Pro appended there using separator you’ve chosen.
Place the code to a place where your script did not use the extra value yet, so you can modify it first and then let the script use correct value:
$separator = '||';
if ($_POST['extra1'] != '') {
$explodedCustomValue = explode($separator, $_POST['extra1'], 2);
if (count($explodedCustomValue) == 2) {
$_REQUEST['extra1'] = $_POST['extra1'] = $explodedCustomValue[0];
}
}
In our example we are using extra1 field and the same separator value as from the step 2 – two pipes. Make sure you use the correct values in your code.
Do not forget to integrate your website with the click tracking code to make it all working.

Discover Post Affiliate Pro's flexible pricing plans tailored to fit your business needs, with options for Pro, Ultimate, and Network packages. Enjoy a free trial with no credit card required, no setup fees, and the freedom to cancel anytime. Benefit from features like unlimited affiliates, advanced reporting, customizable interfaces, and lifetime support. Save up to 20% with annual billing and take advantage of more than 220 integrations. Perfect for businesses seeking to enhance their affiliate marketing efforts. Visit now to find the ideal plan for you!
Discover the essentials of clicks (referrals) tracking with our comprehensive guide. Learn about the importance of click tracking code, explore various code examples including simple, asynchronous, and PHP versions, and dive into advanced tracking options. Optimize your affiliate marketing strategy with expert tips on setting account IDs, managing cookies, and customizing tracking parameters. Visit now to enhance your click tracking implementation!
Overview of Post Affiliate Network
Discover the power of Post Affiliate Network for managing affiliate programs across multiple brands from a single account.