Location: PHPKode > scripts > PHPMass Shopping Cart > phpmass-shopping-cart/user/pproc.php
<?php
/******************************************************************
 * PHPMass Shopping Cart
 * The contents of this file are subject to the PHPMass License. 
 * If you do not agree with PHPMass License Terms and Conditions 
 * than you should not use this software.
 * A copy of the license file is available on www.phpmass.com/license.htm page.
 * 
 * PHPMass.com.
 * All Rights Reserved.
 ******************************************************************/
$SiteSection = 'user';
require('../includes/config.php');

$UserInfos = $Users->getUser($userid);
$UserOrder = $Orders->getOrder($userid,$_POST['payOrder']);
$OrderProducts = $Orders->getOrderProducts($UserOrder['orderid']);
$PaymentMethod = $Payment->getPaymentName($UserOrder['paymentmethod']);
//If the order is not well formated exit
if (!is_array($UserOrder) || !is_array($OrderProducts) || !is_array($PaymentMethod)) {
	$InfoDump = $CMS->makeDump();
	$CMS->insertDebug('Error on payments',$InfoDump);
	header('Location: /user/');
}

$Purchase = new Purchase();
$P_Class = $Purchase->initPClass($PaymentMethod['metodname']);
if ($Purchase->Error) header('Location: /user/');
$formContent = $P_Class->getPaymentForm();


$smarty->assign('FormContent', $formContent);
$smarty->assign('OrderID', $_POST['payOrder']);

$smarty->assign('Order', $UserOrder);
$smarty->assign('Products', $OrderProducts);

$smarty->assign('PageTitle', $Lang['Payment_Step']);
$smarty->assign('Error', $Error);
$smarty->assign('InfoMessage', $InfoMessage);
$smarty->display(DOC_ROOT.'/skin/templates/user/'.'pproc.tpl');



?>
Return current item: PHPMass Shopping Cart