RBS WorldPay

A secure payment service for small and large businesses, includes payments online, card machines and telephone payments.

This is integration method with hosted solution of shop RBS WorldPay. Admin panel allows you to set your Payment Response URLto send transaction details there. This will instruct you how to make it working with RBS WorldPay plugin in Post Affiliate Pro 4.


Login to your admin panel, in menu go to Installation(s), then press button for "Integration Setup: PRODUCTION".
Find "Payment Response URL" and insert this URL:


Last thing to do is to check "Payment Response enabled?"
Do not forget to save your changes.


Payment Response URL already in use

If you already have some URL defined for Payment Response URL, you will need to do these steps:
Edit the file where this URL points to and insert this code to the beginning of the file, or at the beginning of the function with sending IPN:

/* PAP integration */
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, "http://URL_TO_PostAffiliatePro/plugins/WorldPay/worldpay.php");
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
/* end of PAP integration */


Integration of buttons

Now, all your buttons have to be integrated with this code to properly track the affiliate:

<input type="hidden" name="M_aid" value="" id="pap_dx8vc2s5">
<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">

Now, you will be able to track proper affiliates.

Do not forget to produce changes into PRODUCTION environment if you did this changes in TEST environment.
Now, your system is integrated.