Home
Integration Methods
WorldPay (IPN used by other script)
WorldPay (IPN used by other script)
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 FuturePay recurring commissions.
1
Add code
Now add the following code into EVERY WorldPay button form
This will assign cookie value into M_aid and this value will be sent to PAP4 for processing.
2
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="http://www.yoursite.com/affiliate/scripts/notifysale.php" type="text/javascript">
</script>
...
</form>
3
Integration 2
Now the IPN callback is pointed to your script. This callback has to be forwarded also to PAP4 worldpay.php script, which url is http://www.yoursite.com/affiliate/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.
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.