Location: PHPKode > projects > Simple PHP Shopping cart - asaancart > asaancart v-0.9/shop/GetExpressCheckoutDetails.php
<?php
session_start();
include("../config/config.php");
include("classes/functions.php");




/********************************************************
GetExpressCheckoutDetails.php

This functionality is called after the buyer returns from
PayPal and has authorized the payment.

Displays the payer details returned by the
GetExpressCheckoutDetails response and calls
DoExpressCheckoutPayment.php to complete the payment
authorization.

Called by ReviewOrder.php.

Calls DoExpressCheckoutPayment.php and APIError.php.

********************************************************/


//session_start();
if (session_id() == "") session_start();
$session_id = session_id();
/* Collect the necessary information to complete the
   authorization for the PayPal payment
   */

$_SESSION['token']=$_REQUEST['token'];
$_SESSION['payer_id'] = $_REQUEST['PayerID'];

$_SESSION['paymentAmount']=$_REQUEST['paymentAmount'];
$_SESSION['currCodeType']=$_REQUEST['currencyCodeType'];
$_SESSION['paymentType']=$_REQUEST['paymentType'];





$resArray=$_SESSION['reshash'];

/* Display the  API response back to the browser .
   If the response from PayPal was a success, display the response parameters
   */



include("includes/global_settings.php");
$smarty->assign('currencyCodeType',$_REQUEST['currencyCodeType']);
$smarty->assign('paymentAmount',$_REQUEST['paymentAmount']);
$smarty->assign('shipToStreet',$resArray['SHIPTOSTREET']);
$smarty->assign('shipToStreet2',$resArray['SHIPTOSTREET2']);
$smarty->assign('shipToCity',$resArray['SHIPTOCITY']);
$smarty->assign('shipToState',$resArray['SHIPTOSTATE']);
$smarty->assign('shipToZip',$resArray['SHIPTOZIP']);
$smarty->assign('shipToCountryName',$resArray['SHIPTOCOUNTRYNAME']);


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

$smarty->assign('cartTotal',$cartTotal);

$smarty->assign('cartItems',getCartItems($session_id));
$smarty->assign('cartSubTotal', getCartTotalAmount($session_id));
$smarty->assign('total_cart_items', getCartTotalItems($session_id));
//express checkout
$smarty->assign('paymentType','sale');
$smarty->assign('currencyCodeType',getStoreBasicInfoByOneParam('currency'));


$smarty->assign('customer_name', $_SESSION['customer_name']);
$smarty->assign('business_name', $_SESSION['business_name']);
$smarty->assign('email_address', $_SESSION['email_address']);
$smarty->assign('mobile', $_SESSION['mobile']);
$smarty->assign('phone', $_SESSION['phone']);

$smarty->assign('error_msg', $_REQUEST['error_msg']);

$smarty->assign('shipping_instructions', $_SESSION['shipping_instructions']);


$smarty->assign('template','review_order');

$smarty->display('shop/site_index.tpl');
?>
Return current item: Simple PHP Shopping cart - asaancart