Paypal Buy Now button example

This is an example of paypal Buy Now button. You can change fields value according to your need.

<form action="" method="post" target="_top"><input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="" />
<input type="hidden" name="lc" value="IN" />
<input type="hidden" name="item_name" value="Demo" />
<input type="hidden" name="item_number" value="Demo001" />
<input type="hidden" name="amount" value="1.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="button_subtype" value="services" />
<input type="hidden" name="no_note" value="0" />
<input type="hidden" name="return" value="" />
<input type="hidden" name="cancel_return" value="" />
<input type="hidden" name="notify_url" value="" />
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:<span class=" />NonHostedGuest" />
<input type="image" alt="PayPal – The safer, easier way to pay online." name="submit" src="" />
<img alt="" src="" width="1" height="1" border="0" />

For Sandbox form action will be:

In case if you are using Live Paypal then use below URL in your ipn file to get values

$ch = curl_init(‘’);

otherwise please use below url for sandbox
$ch = curl_init(‘’);