Beispiel #1
0
global $cookie;
$CheckPay=new greenworld_ecpay6();
$authorized = false;
foreach (Module::getPaymentModules() as $module)
    if ($module['name'] == $CheckPay->name){
            $authorized = true;
            break;
    }
if (!$authorized)
    die(Tools::displayError('This payment method is not available.'));


$customer = new Customer((int)$cart->id_customer);
$total = $cart->getOrderTotal(true, Cart::BOTH);
$inttotal=round($total);
$InstallmentTotal=(int)($inttotal*( 1 +  ($CheckPay->get6Percentage()/100) ) );
$HomePage=Tools::getShopDomain(true, true).__PS_BASE_URI__;
$order = new Order((int)$CheckPay->currentOrder);
$PointToFinislURL='order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)($cart->id).'&id_module='.(int)$CheckPay->id.'&id_order='.(int)$CheckPay->currentOrder;
$check=Tools::getValue("check");

$smarty->assign(array(
	'total'                 =>  $total ,
	'this_path'             =>  "http://".$_SERVER["HTTP_HOST"].$CheckPay->path,
        'inttotal'              =>  $inttotal,
        'InstallmentTotal'      =>  $InstallmentTotal,
        'home'                  =>  $HomePage
    ));
//
// SESSION["checkStep"] 用來防止,按上一頁,衍生出reload的問題。 
// 第一次進入開始並宣告 checkStep。