WorldPay (IPN used by other script)
Integrate WorldPay with Post Affiliate Pro using IPN callbacks and scripts to generate affiliate commissions during sales. Add specific code to WorldPay button forms to ensure tracking. Compatible with FuturePay recurring commissions.
WorldPay (IPN used by other script) integration
A leading global payments provider for companies of all sizes.
WorldPay integration is similar to PayPal, it also uses WorldPay callback.
Note! This is description of integration with WorldPay if you use WorldPay buttons on your web pages. If you use WorldPay as a processing system in your shopping cart, use the method for integrating with shopping cart, not these steps.
Since version 4.2.5.0 integration with WorldPay works also with FuturePayrecurring commissions.
Add code
Now add the following code into EVERY WorldPay button form:
<input type="hidden" name="M_aid" value="" id="pap_dx8vc2s5">
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
This will assign cookie value into M_aid and this value will be sent to PAP for processing.
Example
Example of updated WorldPay form:
<form action="http://www.worldpay.com....>
...
<input type="hidden" name="M_aid" value="" id="pap_dx8vc2s5">
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript"?
</script>
...
</form>
Integration 2
Now the IPN callback is pointed to your script. This callback has to be forwarded also to PAP worldpay.php script, which url is https://URL_TO_PostAffiliatePro/plugins/WorldPay/worldpay.php.
In case, your worldpay processing script is in PHP, you can use following code to accomplish that. You can place it at the beginning of your processing file:
/* PAP integration */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/WorldPay/worldpay.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* end of PAP integration */
This will ensure that whole IPN callback will be forwarded without affecting your original script
This is all that is required. Now whenever there’s sale, WorldPay will use its callback function to call our sale tracking script, and system will generate commission for the affiliate.
Frequently asked questions
- What is the WorldPay (IPN used by other script) integration?
It’s a method to connect WorldPay payment buttons or scripts with Post Affiliate Pro, enabling automatic tracking of affiliate commissions, including support for recurring commissions via FuturePay.
- How do I add Post Affiliate Pro tracking to my WorldPay forms?
Insert the provided input field and script into every WorldPay button form to assign and send affiliate tracking data to Post Affiliate Pro.
- Does this integration support recurring commissions?
Yes, since version 4.2.5.0, integration with WorldPay works with FuturePay recurring commissions for affiliate payouts.
- What if I use WorldPay in my shopping cart?
If WorldPay is used as a processing system in your shopping cart, use the dedicated shopping cart integration method instead of this script-based method.
- What code is needed to forward the IPN callback to Post Affiliate Pro?
You can use a PHP cURL script to forward the IPN callback to the Post Affiliate Pro worldpay.php script, ensuring all payment notifications are tracked for commissions.
Lucia is a talented content editor who ensures the seamless publication of content across multiple platforms.

Create your free Post Affiliate Pro account
Experience seamless integrations and advanced affiliate tracking with Post Affiliate Pro. Start your free trial today!