PagSeguro (IPN already used)

Integrate PagSeguro with Post Affiliate Pro by checking the notification URL, modifying the IPN script, and setting up the plugin for sales tracking. Ensure the correct URL is used in PagSeguro buttons and activate the plugin for successful tracking.

PagSeguro (IPN already used)

PagSeguro (IPN already used) integration

PagSeguro is a Brazilian-based national e-commerce business allowing payments and money transfers to be made through the Internet.

The integration is done by a built-in plugin which reads PagSeguro data notifications.

Check your notification URL

Navigate to Integrations > Transaction notifications and it there already is a URL defined, it means you have to follow the next steps. First of all, take a note of the URL which you are using right now.

PagSeguro buttons

The next step in case of the integration is to integrate your PagSeguro buttons. Place this extra code into code of every button you want to integrate. Please note the value xxxxxxxxxxxxxxxxx is the notification URL, from the previous step, which you made a note of. Please, replace it in the code:

<input type="hidden" name="notificationURL" value="xxxxxxxxxxxxxxxxx" id="pap_ab78y5t4a">

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a', '', 'pap_custom');
</script>

The code will automatically append the needed tracking value to your notification script. In the next step we will process it.

Modification of the IPN script

We’ve set the needed tracking value to your notification script URL as a GET parameter. Now, we will process it. Find and edit your notification script. Find the place in the code where ‘notificationCode‘ value is processed. At the same place, use this code:

/* [Post Affiliate Pro](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") integration snippet */
file_get_contents('http://URL_TO_PostAffiliatePro/plugins/PagSeguro/pagseguro.php?pap_custom='.$_GET['pap_custom'].'&'.'notificationCode='.$_REQUEST['notificationCode']);
/* /[Post Affiliate](https://www.postaffiliatepro.com/ "Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!") Pro integration snippet */

This will send necessary data to your PagSeguro plugin in Post Affiliate Pro and handle the notification.

Plugin setup

The final step is to activate and configure your PagSeguro plugin. Login to your Post Affiliate Pro merchant panel and navigate to Plugins section. Activate and then configure the PagSeguro plugin. When configuring, you will need the security token mentioned in step 1.

You are done. Your sales will be tracked now.

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

Frequently asked questions

What is PagSeguro (IPN already used) integration?

It’s a method to connect PagSeguro, a Brazilian e-commerce payment platform, with Post Affiliate Pro using the IPN system, enabling automatic sales tracking through plugin setup and notification scripts.

How do I set up PagSeguro integration in Post Affiliate Pro?

You need to check your notification URL in PagSeguro, add specific code to your payment buttons, modify your IPN script to send tracking data, and then activate and configure the PagSeguro plugin within Post Affiliate Pro.

Why do I need to modify my PagSeguro IPN script?

Modifying the IPN script ensures that transaction data is sent from PagSeguro to Post Affiliate Pro, enabling accurate tracking of affiliate-driven sales.

Is this integration suitable for Brazilian businesses?

Yes, PagSeguro is a leading payment platform in Brazil, and this integration is tailored for merchants operating in the Brazilian e-commerce market.

Do I need coding skills to complete this integration?

Basic familiarity with editing scripts is required, as you’ll need to modify your PagSeguro notification URL and IPN script as part of the integration process.

Lucia is a talented content editor who ensures the seamless publication of content across multiple platforms.

Lucia Halašková
Lucia Halašková
Content Editor

Integrate PagSeguro with Post Affiliate Pro

Enhance your affiliate marketing by seamlessly connecting PagSeguro with Post Affiliate Pro. Follow our guide for easy integration, accurate sales tracking, and efficient management.

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface