<?php
$business = “premmelethu@gmail.com”; // Email associated with paypal
$amount = “100.00”; // Amount to be paid
$paypalUrl = “https://www.sandbox.paypal.com/cgi-bin/webscr” ;// Choose this url for testing and make sure that you have changed this when set to live
$return = “http://phpcodez.com/payment-successful.php” ;// Make sure that you have created this page
$cancel = “http://phpcodez.com/payment-cancel.php”;// Make sure that you have created this page
?>
<form class=”paypal” action=”<?php echo $paypalUrl; ?>” method=”post” id=”paypal_form” >
<input type=”hidden” name=”lc” value=”US” />
<input type=”hidden” name=”currency_code” value=”USD” />
<input type=”hidden” name=”first_name” value=”PHPCodez” />
<input type=”hidden” name=”item_number” value=”123456″ / >
<input type=”hidden” name=”return” value=”<?php echo $return; ?>” / >
<input type=”hidden” name=”cancel_return” value=”<?php echo $cancel; ?>” / >
<input type=”hidden” name=”business” value=”<?php echo $business; ?>” / >
<input type=”hidden” name=”item_name” value=”PHPCodez Book” / >
<input type=”hidden” name=”amount” value=”<?php echo $amount; ?>” / >
<input type=”submit” value=”Pay 100 $”/>
<input type=”hidden” name=”cmd” value=”_xclick” />
</form>