PayU (PagosOnline)
Integrate PayU (PagosOnline) with Post Affiliate Pro using extra fields and notification URLs for payment buttons. Modify buttons, handle notifications, and ensure proper setup with the PayU PagosOnline plugin for click tracking integration.
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.
Frequently asked questions
- What is PayU (PagosOnline) integration in Post Affiliate Pro?
It is a setup that allows you to track sales and affiliate commissions from PayU (PagosOnline) payments by integrating with Post Affiliate Pro using extra fields and notification URLs.
- How do I modify my PayU payment button for integration?
Add a hidden input field for an unused extra field and include the provided script tag. If all extra fields are used, assign the PAP ID to an existing field and use the recommended script for tracking.
- What if all PayU extra fields are already in use?
Assign the Post Affiliate Pro ID to an existing extra data field, then use a JavaScript snippet to append and track values using a separator. Ensure correct field and separator settings in your plugin.
- Why is the notification URL important for integration?
The notification URL ensures transaction data is sent to Post Affiliate Pro, enabling accurate tracking of payments and affiliate commissions.
- Can I get help or try Post Affiliate Pro for free?
Yes, you can schedule a one-on-one call for guidance or start a free 1-month trial to explore all features.
Start Your Free Trial with Post Affiliate Pro
Experience seamless affiliate tracking and payment integrations. Try Post Affiliate Pro for free and elevate your affiliate program today!