";
$headers = "MIME-Version: 1.0;\n";
$headers .= "Content-type: text/html; charset=iso-8859-1;\n";
$headers .= "From: ".$_POST['email_address'];
/****************************************************************************/
if($_POST['paymentmode']=='OnlinePaypal'){
require_once('paypal.class.php'); // include the class file
$p = new paypal_class; // initiate an instance of the class
//$p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; // testing paypal url
$p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url
// setup a variable for this script (ie: 'http://www.micahcarrick.com/paypal.php')
$this_script = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
// if there is not action variable, set the default action of 'process'
if (empty($_GET['action'])) $_GET['action'] = 'process';
switch ($_GET['action']) {
case 'process': // Process and order...
$p->add_field('first_name', $first_name);
$p->add_field('last_name', $last_name);
$p->add_field('email', $email_address);
$p->add_field('H_PhoneNumber', $mobile_no);
$p->add_field('business', 'treksinfo@gmail.com');
$p->add_field('return', $this_script.'?action=success');
$p->add_field('cancel_return', $this_script.'?action=cancel');
$p->add_field('notify_url', $this_script.'?action=ipn');
$p->add_field('item_name', 'Trekking Tour To :-'.$destination);
$p->add_field('amount', $amount);
$p->submit_paypal_post(); // submit the fields to paypal
break;
}
}
/*************************************************************************/
if(isset($_GET['action']) && $_GET['action']=='success'){
$message .= "