Home Integration Methods BluePay


Integration with BluePay uses BluePay's custom field (there are two available) and a Trans Notify Post which sends order details to a predefined URL. What you have to do is to point the URL to your BluePay plugin of your Post Affiliate Pro.

The plugin can read total cost, order ID, recurring commission and refunds, and customer information. You can also create an affiliate account for your paying customers automatically.
Plugin configuration
First of all, you have to activate the Bluepay plugin in your PAP. After the activation, you have to configure the plugin - set custom field ID 2 (custom field 1 is not supported anymore) and set if you want an affiliate account to be created when payments received.
BluePay configuration
The integration is based on Trans Notify Post function - it sends data notification about each order to a predefined URL. The URL will be the BluePay plugin of your Post Affiliate Pro. To make it working, you have to use this URL as your  Trans Notify Post:
HTML form
To integrate your payment forms, you only have to add a hidden field for custom values. Make sure your buttons do not include CUSTOM_ID2 in the protected fields.

Here is the hidden field tracking code:
In case you already use CUSTOM_ID2, continue to the next step please.

This is it, you are done. Payments will be tracked to your Post Affiliate Pro from now.
HTML form - custom fields already used
If you already use both custom fields for something else, you will have to use the following code. The code will add a special separator to the existing value and then the needed tracking value (visitor ID).
In our example we are using a default "||" separator which you can change in plugin configuration and in the integration code.

The first step is to add the ID attribute to the custom field:
When added, add this code to the button form you are integrating:
This is the result hidden field and the tracking code below it:
<input type="hidden" name="CUSTOM_ID2" value="existing_custom_value" id="pap_ab78y5t4a" />

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript">
<script type="text/javascript"> 
HTML form - custom fields already used - final step
There is one last step you have to take - as you already use custom fields for some other purposes than for Post Affiliate Pro tracking, you have to make sure the custom value we added will be removed so your application/code could work correctly.

Find the scrip which processes custom fields and add this code somewhere before your the custom values are loaded (we are using PHP code in our example, with custom ID 2):
That's it, your sale tracking has just been integrated.
Do not forget to integrate your site with the click tracking code.