Notice
You should only use this tutorial and have Paypal enabled if you’re really using DIRECT Paypal buttons on your website that were created at the Paypal website. If instead you are really using a cart/membership system with Paypal enabled as the payment option, please enable the cart/membership system in your cart integration wizard instead then follow the instructions provided for your specific cart/membership system.

For those using a direct Paypal button, you will need to update your buttons to use the IPN file provided with iDevAffiliate. You have two options to setup your Paypal buttons.

Option 1.
Use the Paypal tool in your Paypal account to create your Paypal buttons.

View PDF Tutorial

Option 2.
Use our button source below.

Note: PayPal buttons can look very different and there are many options available. These are basic buttons with no options. Be sure to refer to the PayPal Manual for more information on options and different variable settings.

Copy/Paste the below code into a .php page on your website and make sure your PATH settings are correct.
Paypal Buynow Buttons

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="payments@YOURSITE.com" />
<input type="hidden" name="amount" value="0.10" />
<input type="hidden" name="item_name" value="Your Product Name" />
<input type="hidden" name="item_number" value="123456789" />
<input type="hidden" name="return" value="http://www.YOURSITE.com/thanks.html" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="notify_url" value="http://www.YOURSITE.com/idevaffiliate/connect/paypal_ipn_buynow.php" />
<input type="hidden" name="custom" value="<?PHP echo $_SERVER['REMOTE_ADDR']; ?>" />
<input type="hidden" name="undefined_quantity" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="bn" value="PP-BuyNowBF" />
<input type="submit" value="Buy Now" />
</form>

Paypal Subscription Buttons

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="business" value="payments@YOURSITE.com" />
<input type="hidden" name="item_name" value="Your Subscription Name" />
<input type="hidden" name="item_number" value="123456789" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="return" value="http://www.YOURSITE.com/thanks.html" />
<input type="hidden" name="a1" value="79.99" />
<input type="hidden" name="p1" value="30" />
<input type="hidden" name="t1" value="D" />
<input type="hidden" name="a3" value="29.99" />
<input type="hidden" name="p3" value="30" />
<input type="hidden" name="t3" value="D" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="notify_url" value="http://www.YOURSITE.com/idevaffiliate/connect/paypal_ipn_recurring.php" />
<input type="hidden" name="custom" value="<?PHP echo $_SERVER['REMOTE_ADDR']; ?>" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="submit" value="Subscribe" />
</form>

Paypal Shopping Cart Button

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="payments@YOURSITE.com" />
<input type="hidden" name="amount" value="0.10" />
<input type="hidden" name="item_name" value="Your Product Name" />
<input type="hidden" name="item_number" value="123456789" />
<input type="hidden" name="return" value="http://www.YOURSITE.com/thanks.html" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="notify_url" value="http://www.YOURSITE.com/idevaffiliate/connect/paypal_ipn_buynow.php" />
<input type="hidden" name="custom" value="<?PHP echo $_SERVER['REMOTE_ADDR']; ?>" />
<input type="hidden" name="undefined_quantity" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="bn" value="PP-BuyNowBF" />
<input type="hidden" name="add" value="1" />
<input type="submit" value="Add To Cart" />
</form>

Experimental Code

Instead of using the code for the “custom” field in the above examples, you can try replacing that line with the following code.

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<input type="hidden" class="getip" name="custom" value="" />
<script>
function GetUserIP(){
var ret_ip;
$.ajaxSetup({async: false});
$.get('//jsonip.com/', function(r){
ret_ip = r.ip;
});
return ret_ip;
}
var getip = GetUserIP();
$('.getip').val(getip);
</script>

Using this button source code on a WordPress page?

If so, you will need a second tutorial as well.

View Paypal Buttons w/ WordPress Tutorial