Wishlist Member, iDevAffiliate, Paypal…
edit: This article was edited on June 7, 2010 to include the iDevAffiliate Subscribe notify link in the examples.
In February, I released Enhanced Paypal ShortCodes for WordPress that enables website owners to easily add Paypal buttons on their pages. Personally, I think it’s a great little plugin that saves me a heap of time because I don’t have to mess around cutting and pasting the paypal form code into the HTML panel of the WordPress editor.
The motivation behind creating this pluginwas actually to make it easier to integrate iDevAffiliate with Wishlist Member. When using iDevAffiliate with Paypal, it is not possible to use Saved Paypal buttons – you must use full paypal form code and add some extra fields to the code…. the extra fields are so that paypal can ‘tell’ iDevAffiliate that a successful sale has been made.
When Wishlist Member is added to the mix, extra field codes are required as well so that Wishlist Member is ‘told’ of the successful sale.
I’ve created a diagram showing how I see the affiliate referral, payment and notification process:
Using the full form code is all good and well, but I found that it was problematic and often caused my clients more trouble than not. Hence, the enhanced paypal shortcodes plugin.
Here is how I use the enhanced paypal shortcode plugin to integrate Wishlist Member and iDevAffiliate and use Paypal as the payment processor:
1. Create a php file called paypal.php that contains:
Header("content-type: application/x-javascript");
$serverIP=$_SERVER['REMOTE_ADDR'];
echo "document.write(\"<input name=custom type=hidden value=$serverIP />\")";
?>
2. Upload this file to wp-content/uploads (or any folder you like, just remember where you put it!)
3. Install and activate the Enhanced Paypal Shortcodes plugin
You can download a copy from here or use the Install New Plugin function on your blog
4. Add the shortcode where ever you want your paypal button to appear.
Suggested usage for a buy now button is:
[paypal type="paynow" amount="12.99" email="payments@yoursiteurl.com" itemno="12345657" name="Description" noshipping="1" nonote="0" currencycode="USD" imageurl="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" rm="2" src="0" notifyurl="http://yoursiteurl.com/index.php/register/GotS4f" notifyurl2="http://www.yoursiteurl.com/idevaffiliate/paypal_ipn_buynow.php" returnurl="http://yoursiteurl.com/index.php/register/GotS4f" scriptcode="/integration/paypal1.php" width="400px" textalign="center" marginleft="10px"]
I’ve deliberately put spaces before the “[" and "]” so the code will print in the post – make sure you remove those spaces!
Set itemno to the Item/Subscription ID in the Integration section of Wishlist Member
Set notifyurl to the Thankyou URL shown in the Integration section of Wishlist Member
Set notifyurl2 to the Notify URL specified in the Paypal module of your iDevAffiliate installation.
Set returnurl to the Thankyou URL shown in the Integration section of Wishlist Member
Set scriptcode to the folder where you uploaded the paypal.php file too (e.g /wp-content/uploads) – it is important that you get this addressing correct, or the integration won’t work.
Due to popular demand, I’ve included the suggested Usage for a subscription button:
[ paypal type="subsribe" email="payments@yoursiteurl.com" itemno="12345657" name="Description" noshipping="1" currencycode="USD" imageurl="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" a1="1" p1="7" t1="D" a2="3" p2="1" t3="M" a3="47" p3="1" t3="M" rm="2" notifyurl="http://yoursiteurl.com/index.php/register/GotS4f" notifyurl2="http://www.yoursiteurl.com/idevaffiliate/paypal_ipn_recurring.php" returnurl="http://yoursiteurl.com/index.php/register/GotS4f" scriptcode="/integration/paypal1.php" width="400px" textalign="center" marginleft="10px" ]
For more information on how to set the other parameters for this plugin, refer to the plugin FAQ
That’s it – you should now have integration between iDevAffiliate, Wishlist Member and Paypal!
Have you used this plugin? Share your thoughts! Also, please rate the plugin in the Repository.

