Segpay integrates using postback calls and allows to track recurring/subscription payments and refunds.

To integrate with Segpay, you have to turn on the Segpay postback handling plugin in the merchant panel of Post Affiliate Pro (Network) in the Configuration -> Plugins section. Then follow the steps below.

1.

Setting up Postback in Segpay

Log in to your Segpay admin and go to My websites -> Postbacks section, where you need to add a new postback and insert the following URL as Trans post or 2nd Trans post:

URL_TO_PostAffiliatePro/plugins/Segpay/segpay.php?accountid=Account_ID

2.

Integration code

Add the following code into EVERY Segpay button form:

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

This will write the visitor's tracking cookie information into the merchantpartnerid field in Segpay which will be passed through postback back to Post Affiliate Pro (Network).

3.

Example

Example of updated Segpay form:

<form method="get" action="https://secure2.segpay.com/billing/poset.cgi" name="segpay" id="segpay">
<div class="field half first">E-mail: <input type="email" name="x-billemail"></div>
<div class="field half first">Password: <input type="password" name="password"></div>
<input type="hidden" name="x-eticketid" value="195563:22588" />
<input type="hidden" name="start_uri" value="">
<input type="hidden" name="action" value="register">
<input type="hidden" name="x-billcntry" value="US">
<input type="submit" value="Proceed to checkout" />
<input type="hidden" name="merchantpartnerid" value="" id="pap_dx8vc2s5" />
<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
</form>

Note: If you have more buttons at one page, you should add the merchantpartnerid field code in each button/form and add the script tag just once per page below all the buttons/forms.

4.

If you use just simple Segpay links like:

<a href="https://secure2.segpay.com/billing/poset.cgi?x-eticketid=196284:23181">Click here to order</a>

then you need to do the integration the following way:

  • into each link add: id="segpaylink"
    so the link would look like this:
    <a id="segpaylink" href="https://secure2.segpay.com/billing/poset.cgi?x-eticketid=196284:23181">Click here to order</a>
  • under the JavaScript version of click tracking code that is supposed to be in the footer of your page right above the </body> tag add the following code:
    <!-- Post Affiliate Pro Integration snippet --> <script> PostAffTracker.writeCookieToLink('segpaylink', 'merchantpartnerid'); </script> <!-- /Post Affiliate Pro Integration snippet -->
    NOTE: The Segpay links must be in your page somewhere above the <!-- PAP Integration snippet --> line.

Do not forget to set up the Postback call from first step.