Gravity Forms (WordPress module)

A full featured contact form plugin that features a drag and drop interface, advanced notification routing, lead capture, conditional logic fields, multi-page forms, pricing calculations and the ability to create posts from external forms.

Contact Forms for WordPress Just Don't Get Any Easier than Gravity Forms

1.

GravityForms with PayPal

If you want to track paypal payments through your GravityForms, you have to follow these few steps.

The first step is to login to your FTP where your WordPress is installed at and find file wp-content/plugins/gravityforms/form_display.php

Edit the file and find this line:

return $footer;

Paste this code above the line:

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

Save your work.

2.

GravityForms with PayPal 2

Now, edit file wp-content/plugins/gravityformspaypal/class-gf-paypal.php

(if you have no 'class-gf-paypal.php' file, then you may have a 'paypal.php' file only)

and find the following line of code:
$ipn_url = urlencode(get_bloginfo("url") . "/?page=gf_paypal_ipn");

Add this code below the line:

  /* Post Affiliate Pro integration snippet */
  $ipn_url .= urlencode("&pap_custom=".$_POST['custom']);
  /* /Post Affiliate Pro integration snippet */

Now find this line:

private static function verify_paypal_ipn(){

and paste this code right below the line:

/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"http://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 */


Do not forget to integrate your WordPress with the click tracking code - best practice is to place it to footer file, using Appearance> Edit