source: branches/feature-module-update/html/shopping/loan.php @ 16582

Revision 16582, 3.6 KB checked in by nanasess, 16 years ago (diff)

ライセンス表記変更

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24require_once("../require.php");
25
26class LC_Page {
27    function LC_Page() {
28        $this->tpl_mainpage = 'shopping/loan.tpl';
29        $this->tpl_css = URL_DIR.'css/layout/shopping/pay.css';
30        // ホームアドレス
31        $this->tpl_homeaddr = CF_HOMEADDR;
32        // シュミレーション呼び出し
33        $this->tpl_simulate = CF_SIMULATE;
34        // 加盟店コード
35        $this->tpl_storecode = CF_STORECODE;
36        // 戻り先
37        $this->tpl_returnurl = CF_RETURNURL;
38        // 呼び出し区分(0:シュミレーションのみ、1:シュミレーション+申込)
39        $this->tpl_continue = CF_CONTINUE;
40        // 役務有無区分(0:無、1:有)
41        $this->tpl_labor = CF_LABOR;
42        // 結果応答(1:結果あり、2:結果なし)
43        $this->tpl_result = CF_RESULT;
44        // キャンセルURL
45        $this->tpl_cancelurl = CF_CANCELURL;
46        /*
47         session_start時のno-cacheヘッダーを抑制することで
48         「戻る」ボタン使用時の有効期限切れ表示を抑制する。
49         private-no-expire:クライアントのキャッシュを許可する。
50        */
51        session_cache_limiter('private-no-expire');     
52    }
53}
54
55$objPage = new LC_Page();
56$objView = new SC_SiteView();
57$objSiteSess = new SC_SiteSession();
58$objCartSess = new SC_CartSession();
59$objCampaignSess = new SC_CampaignSession();
60$objCustomer = new SC_Customer();
61$objSiteInfo = $objView->objSiteInfo;
62$arrInfo = $objSiteInfo->data;
63
64// 注文一時IDの取得
65$uniqid = $objSiteSess->getUniqId();
66
67// ローン決済の戻り値をチェックする。
68if($_GET['tranno'] == $uniqid) {
69    // ローン決済受付番号をDBに書き込む
70    $sqlval['loan_result'] = $_GET['receiptno'];
71    $objQuery = new SC_Query();
72    $objQuery->update("dtb_order_temp", $sqlval, "order_temp_id = ?", array($uniqid));
73    // 正常に登録されたことを記録しておく
74    $objSiteSess->setRegistFlag();
75    // 処理完了ページへ
76    header("Location: " . URL_SHOP_COMPLETE);
77}
78
79switch($_POST['mode']) {
80// 前のページに戻る
81case 'return':
82    // 正常な推移であることを記録しておく
83    $objSiteSess->setRegistFlag();
84    header("Location: " . URL_SHOP_CONFIRM);
85    exit;
86    break;
87default:
88    break;
89}
90
91// カート集計処理
92$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo);
93// 一時受注テーブルの読込
94$arrData = sfGetOrderTemp($uniqid);
95// カート集計を元に最終計算
96$arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo);
97
98// 支払い総額
99$objPage->tpl_amount = $arrData['payment_total'];
100// 受注仮番号
101$objPage->tpl_tranno = $uniqid;
102// 基本情報を渡す
103$objPage->arrInfo = $arrInfo;
104
105$objView->assignobj($objPage);
106// フレームを選択(キャンペーンページから遷移なら変更)
107$objCampaignSess->pageView($objView);
108//--------------------------------------------------------------------------------------------------------------------------
109?>
Note: See TracBrowser for help on using the repository browser.