source: branches/feature-module-zeus/data/downloads/module/mdl_zeus/mdl_zeus.inc @ 15422

Revision 15422, 3.0 KB checked in by naka, 17 years ago (diff)
Line 
1<?php
2/**
3 *
4 * @copyright   2000-2007 LOCKON CO.,LTD. All Rights Reserved.
5 * @version CVS: $Id: mdl_epsilon.inc 7162 2006-11-18 09:53:33Z kakinaka $
6 * @link        http://www.lockon.co.jp/
7 *
8 */
9require_once(DATA_PATH . "module/Request.php");
10
11/**** ¢§Äê¿ôÀë¸À *********************************************************************************************/
12
13define("MDL_ZEUS_ID", 10);
14
15// ¥¯¥ì¥¸¥Ã¥Èʬ³ä²ó¿ô
16$arrPaymentClass = array(
17    '1' => '°ì³çʧ¤¤',
18);
19
20define("ZERO_PC", 1);        // dtb_payment ¤Î¶èʬÍÑ
21define("ZERO_MOBILE", 2);    // dtb_payment ¤Î¶èʬÍÑ
22define("ZERO_CREDIT_ID", 1);      // dtb_payment ¤Î¶èʬÍÑ
23
24// Á÷¿®¥Ñ¥é¥á¡¼¥¿
25define ("SEND_PARAM_CUSTOM", "yes");
26define ("SEND_PARAM_ACT", "imode");
27define ("SEND_PARAM_SEND", "jpall");
28define ("SEND_PARAM_PC_URL", "https://credit.zeroweb.ne.jp/cgi-bin/order.cgi?orders");
29define ("SEND_PARAM_MOBILE_URL", "https://credit.zeroweb.ne.jp/cgi-bin/order.cgi");
30define ("SEND_PARAM_DELIMITER", "_");                           // sendid¤Îʬ³äʸ»ú
31
32// ʸ»ú¿ôÀ©¸Â
33define ("CLIENTIP_LEN", 5);
34define ("SEND_LEN", 20);
35
36
37/**************************************************************************************************************
38 * ´Ø¿ô̾   ¡§sfPostPaymentData
39 * ½èÍýÆâÍÆ ¡§·èºÑ¥Ç¡¼¥¿Á÷¿®½èÍý
40 * °ú¿ô1    ¡§
41 * °ú¿ô2    ¡§
42 * °ú¿ô3    ¡§
43 * Ìá¤êÃÍ   ¡§¼èÆÀ·ë²Ì
44 **************************************************************************************************************/
45function sfPostPaymentData($arrData){
46    $arrPost = array(
47        'clientip' => '94181',
48        'cardnumber' => $arrData['card_no01'].$arrData['card_no02'].$arrData['card_no03'].$arrData['card_no04'],
49        'expyy' => $arrData['card_year'],
50        'expmm' => $arrData['card_month'],
51        'telno' => '0663467705',
52        'email' => 'naka@lockon.co.jp',
53        'sendid' => '1111',
54        'username' => $arrData['card_name01'].$arrData['card_name02'],
55        'money' => '3600',
56        'sendpoint' => 'eccube',
57        'send' => 'mall',
58        'pubsec' => ''
59    );
60   
61    sfPrintR($arrPost);
62   
63    $req = new HTTP_Request('https://linkpt.cardservice.co.jp/cgi-bin/secure.cgi');
64    $req->setMethod(HTTP_REQUEST_METHOD_POST);
65    $req->addPostDataArray($arrPost);
66   
67    if (!PEAR::isError($req->sendRequest())) {
68        $response = $req->getResponseBody();
69        $response = mb_convert_encoding($response, "EUC-JP", "Shift-JIS");
70    }
71    $req->clearPostData();
72
73    sfPrintR($response);
74   
75    //Success_order
76    return $arrVal;
77}
78/**************************************************************************************************************
79 * ´Ø¿ô̾   ¡§sfZeusDisp
80 * ½èÍýÆâÍÆ ¡§¶¦Ä̤Îɽ¼¨½èÍý
81 * °ú¿ô1    ¡§
82 * °ú¿ô2    ¡§
83 * °ú¿ô3    ¡§
84 * Ìá¤êÃÍ   ¡§¼èÆÀ·ë²Ì
85 **************************************************************************************************************/
86function sfZeusDisp($objPage, $payment_id) {
87    $objQuery = new SC_Query();
88    // »Ùʧ¤¤ÊýË¡¤ÎÀâÌÀ²èÁü¤ò¼èÆÀ¤¹¤ë¡£
89    $arrRet = $objQuery->select("payment_method, payment_image", "dtb_payment", "payment_id = ?", array($payment_id));
90    $objPage->tpl_payment_method = $arrRet[0]['payment_method'];
91    $objPage->tpl_payment_image = $arrRet[0]['payment_image'];
92    return $objPage;
93}
94?>
Note: See TracBrowser for help on using the repository browser.