OptimizePress is the new way to create high converting landing pages, sales pages and membership portals.

The integration method integrates PayPal directly.

1.

PayPal module integration

The first step is to modify the paypal module so each payment is integrated with the tracking cookie. Navigate to wp-content/plugins/optimizeMember/includes/classes/ and find the file sc-paypal-button-e.inc.php.. Now open it and find the line (at the end) saying:
return $code;

Insert the following code above that line:

/* Post Affiliate Pro integration snippet */
$code = str_replace('name="notify_url"','name="notify_url" id="pap_ab78y5t4a"',$code);
$code .= '<script type="text/javascript">
  document.write(unescape("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">'."
  PostAffTracker.setAccountId('Account_ID');
  PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a', '', 'pap_custom');
</script>";
/* /Post Affiliate Pro integration snippet */

Save your work and continue to the second step.

2.

PayPal notification integration

To make PayPal communicate with your Post Affiliate Pro you have to add a special code to the file wp-content/plugins/optimizeMember/includes/classes/paypal-notify.inc.php

Open the file and find this code:

if(!empty($_GET['optimizemember_paypal_notify']))
    c_ws_plugin__optimizemember_paypal_notify_in::paypal_notify();

Replace it with this code:

/* Post Affiliate Pro integration snippet */
if(!empty($_GET['optimizemember_paypal_notify'])) {
    /* Post Affiliate Pro integration snippet */
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php?pap_custom=".$_GET['pap_custom']);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
    curl_exec($ch);
    /* Post Affiliate Pro integration snippet */
    
    c_ws_plugin__optimizemember_paypal_notify_in::paypal_notify();
}
/* /Post Affiliate Pro integration snippet */

Save your work and that's it. Your OptimizePress is now integrated.

3.

Activate your PayPal plugin

The final step is to activate your PayPal plugin in your Post Affiliate Pro.


Do not forget to integrate your WordPress with the click tracking code. You can place the click tracking code directly into OptimizePress> Dashboard> Analytics and Tracking into the section _Other Tracking Code_s.