To integrate with 2Checkout using INS you need 2Checkout plugin for Post Affiliate Pro.

1.

Plugin configuration in Post Affiliate Pro

First you have to activate "2Checkout" plugin in Post Affiliate Pro (You can find it in plugins section Configuration> Plugins).

2.

HTML Sale form

You have to pass the tracking cookie value (visitorId) to 2Checkout along with payment details. To do this, check if your form uses a hidden field named merchant_order_id:

<input type='hidden' name='merchant_order_id' id='merchant_order_id' />

If it does add the following code into the form. Otherwise, add also the above line.

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.writeCookieToCustomField('merchant_order_id');
</script>

3.

2Checkout settings in vendor area

After logging into 2Checkout navigate to Integrations> Webhooks & API> INS Settings and add an endpoint to point to this URL:

http://URL_TO_PostAffiliatePro/plugins/TwoCheckout/twocheckout.php

Tip: If you want to use recurring commissions you have to activate 'Recurring Commissions' feature in Post Affiliate Pro.


Don't forget to integrate your site with the click tracking code to make it all working. Make sure the integration code uses the same protocol as your site (if your site uses HTTPS the integration code has to use it as well).

NOTE:

The notifications are not sent out in the test mode. If you want to test your integration, you will have to do a live 'test'. Create a $1 product and test it.