<?php

require_once("config.php");

?>

<form method="post" name="paypal_form" action="https://www.paypal.com/cgi-bin/webscr">

    <!-- PayPal Configuration --> 
	<input type="hidden" name="cmd" value="_xclick" /> 
	<input type="hidden" name="business" value="<?php echo($receiver_email); ?>" />
	<input type="hidden" name="currency_code" value="<?php echo($mc_currency); ?>" />
	<input type="hidden" name="no_note" value="1" />

	<!-- Product Information --> 
	<input type="hidden" name="item_name" value="<?php echo($item_name); ?>" />
	<input type="hidden" name="amount" value="<?php echo($mc_gross); ?>" />
	<input type="hidden" name="item_number" value="<?php echo($item_number); ?>" />

	<!-- //language code, France(FR), Spain (ES), Italy (IT), Germany (DE), China (CN), English (US). -->
	<input type="hidden" name="lc" value="US" />

	<?php
	//Custom entry
	if ( isset( $_POST["custom"] ) ) {
		$custom = $_POST["custom"];
		?>
		<input type="hidden" name="custom" value="<?php echo( $custom ) ?>" />
        <?php
	}	
	
	?>
	<!-- Shipping -->
	<input type="hidden" name="shipping" value="<?php echo( $shipping ) ?>" />
    <?php
	?>

	<!-- URLs -->
	<input type="hidden" name="notify_url" value="<?php echo($notify_url); ?>" />
	<?php
	if ($cancel_url != "") {
	?>
		<input type="hidden" name="cancel_return" value="<?php echo($cancel_url); ?>" />
	<?php
	}
	?>
	
	<?php
	if ($return_url != "") {
	?>	
		<input type="hidden" name="return" value="<?php echo($return_url); ?>" />
	<?php
	} 
  
    ?>

	<input type="submit" name="submit" value="Make Purchase" />

</form>

<?php

?>

