1 | <?php |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2010 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 | require_once("../require.php"); |
---|
24 | |
---|
25 | $objSiteSess = new SC_SiteSession(); |
---|
26 | $objCartSess = new SC_CartSession(); |
---|
27 | $objQuery = new SC_Query(); |
---|
28 | |
---|
29 | // 前のページで正しく登録手続きが行われた記録があるか判定 |
---|
30 | SC_Utils::sfIsPrePage($objSiteSess); |
---|
31 | |
---|
32 | // SPSモジュール連携用 |
---|
33 | if (file_exists(MODULE_PATH . 'mdl_sps/inc/include.php') |
---|
34 | && !$objCartSess->getTotalQuantity()) { |
---|
35 | |
---|
36 | require_once MODULE_PATH . 'mdl_sps/inc/include.php'; |
---|
37 | header("Location: " . ERROR_URL); |
---|
38 | exit; |
---|
39 | } |
---|
40 | |
---|
41 | // アクセスの正当性の判定 |
---|
42 | $uniqid = SC_Utils::sfCheckNormalAccess($objSiteSess, $objCartSess); |
---|
43 | |
---|
44 | $payment_id = $_SESSION["payment_id"]; |
---|
45 | |
---|
46 | // 支払いIDが無い場合にはエラー |
---|
47 | if($payment_id == ""){ |
---|
48 | SC_Utils::sfDispSiteError(PAGE_ERROR, "", true); |
---|
49 | } |
---|
50 | |
---|
51 | // 決済情報を取得する |
---|
52 | $objDB = new SC_Helper_DB_Ex(); |
---|
53 | |
---|
54 | if($objDB->sfColumnExists("dtb_payment", "memo01")){ |
---|
55 | $sql = "SELECT module_path, memo01, memo02, memo03, memo04, memo05, memo06, memo07, memo08, memo09, memo10 FROM dtb_payment WHERE payment_id = ?"; |
---|
56 | $arrPayment = $objQuery->getall($sql, array($payment_id)); |
---|
57 | } |
---|
58 | |
---|
59 | if(count($arrPayment) > 0) { |
---|
60 | $path = $arrPayment[0]['module_path']; |
---|
61 | if(file_exists($path)) { |
---|
62 | require_once($path); |
---|
63 | exit; |
---|
64 | } else { |
---|
65 | SC_Utils::sfDispSiteError(FREE_ERROR_MSG, "", true, "モジュールファイルの取得に失敗しました。<br />この手続きは無効となりました。"); |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | ?> |
---|