Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/shop/paypal.php
<?php
session_start();
/*
asaancart - easy shopping cart solution
---------------------------------------

Copyright 2009 Nasir Ahmad Khan
Email: hide@address.com

This file is part of asaancart - open source easy shopping cart solution.

asaancart is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

asaancart is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with asaancart.  If not, see <http://www.gnu.org/licenses/>.

*/

include("../config/config.php");
include("classes/functions.php");
if (session_id() == "") session_start();
$session_id = session_id();

include("includes/global_settings.php");

$smarty->assign('shippingTotal',shippingRate(getCartTotalAmount($session_id)));
$cartTotal  = getCartTotalAmount($session_id)+ shippingRate(getCartTotalAmount($session_id));
//end shipping cost


$shippingTotal = shippingRate(getCartTotalAmount($session_id));
$cartSubTotal = getCartTotalAmount($session_id);

$customer_name = $_POST['customer_name'];
$_SESSION['customer_name'] = $customer_name;

$business_name = $_POST['business_name'];
$_SESSION['business_name'] = $business_name;
if($business_name==""){$business_name = " ";}
$email_address = $_POST['email_address'];
$_SESSION['email_address'] = $email_address;

$customer_mobile = $_POST['customer_mobile'];
$_SESSION['mobile'] = $customer_mobile;

$customer_phone = $_POST['customer_phone'];
$_SESSION['phone'] = $customer_phone;

$customer_state = $_POST['customer_state'];
$_SESSION['state'] = $customer_state;

$customer_city = $_POST['customer_city'];
$_SESSION['city'] = $customer_city;

$customer_suburb = $_POST['customer_suburb'];
$_SESSION['suburb'] = $customer_suburb;

$customer_postcode = $_POST['customer_postcode'];
$_SESSION['postcode'] = $customer_postcode;

$customer_address = $_POST['customer_address'];
$_SESSION['address'] = $customer_address;

$s_customer_country = $_POST['s_customer_country'];
$_SESSION['shipping_country'] = $s_customer_country;

$s_customer_state = $_POST['s_customer_state'];
$_SESSION['shipping_state'] = $s_customer_state;

$s_customer_city = $_POST['s_customer_city'];
$_SESSION['shipping_city'] = $s_customer_city;

$s_customer_postcode = $_POST['s_customer_postcode'];
$_SESSION['shipping_postcode'] = $s_customer_postcode;

$s_customer_suburb = $_POST['s_customer_suburb'];
$_SESSION['shipping_suburb'] = $s_customer_suburb;

$s_customer_address = $_POST['s_customer_address'];
$_SESSION['shipping_address'] = $s_customer_address;

$shipping_instructions = $_POST['shipping_instructions'];
$_SESSION['shipping_instructions'] = $shipping_instructions;

$mailing_list = $_POST['mailing_list'];
if($mailing_list!="yes"){$mailing_list = "no";}

$paymentAmount = $_POST['paymentAmount'];
$paymentType = $_POST['paymentType'];
$currencyCodeType = $_POST['currencyCodeType'];

$payment_option = "PayPal Express Checkout";

$error_msg = "";
if($customer_name==""){
$error_msg .= "Customer Name <br />";
}
if($email_address==""){
$error_msg .= "Email Address <br />";
}

if($error_msg!=""){
	header("location: checkout.php?error_msg=".$error_msg);
}else{
	header("location: ReviewOrder.php?customer_name=".$customer_name."&business_name=".$business_name."&email_address=".$email_address."&mobile=".$customer_mobile."&phone=".$customer_phone."&paymentType=".$paymentType."&currencyCodeType=".$currencyCodeType."&paymentAmount=".$paymentAmount);
}




?>
Return current item: Simple PHP Shopping cart - asaancart