If you want to integrate iDev Affiliate (iDevDirect - http://www.idevdirect.com) with WP eStore then follow these set of tweaks. Our objective here is to pass the customers IP address so a commission can be awarded from the post payment processing script.
The latest version of WP eStore plugin already passes the IP Address to the post payment processing script so no need to worry about that.
Open the "paypal.php" file and search for the following line:
$this->debug_log('Updating Affiliate Database Table with Sales Data if Using the WP Affiliate Platform Plugin.',true);
Once you find it add the following bit of code just above that line:
$ip = $customvariables['ip'];
$sale_amount = $this->ipn_data['mc_gross'];
$order_num = $this->ipn_data['txn_id'];
$prepared_url = "http://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=".$sale_amount."&idev_ordernum=".$order_num."&ip_address=".$ip;
$this->debug_log('Adding iDev commission. Prepared URL = '.$prepared_url,true);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $prepared_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
Now, run a test traction and make sure everything is working.