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 | */ |
---|
9 | require_once(DATA_PATH . "module/Request.php");
|
---|
10 | |
---|
11 | /**** ¢§Äê¿ôÀë¸À *********************************************************************************************/ |
---|
12 | |
---|
13 | define("MDL_ZEUS_ID", 10);
|
---|
14 |
|
---|
15 | // ¥¯¥ì¥¸¥Ã¥Èʬ³ä²ó¿ô
|
---|
16 | $arrPaymentClass = array(
|
---|
17 | '1' => '°ì³çʧ¤¤',
|
---|
18 | );
|
---|
19 |
|
---|
20 | define("ZERO_PC", 1); // dtb_payment ¤Î¶èʬÍÑ |
---|
21 | define("ZERO_MOBILE", 2); // dtb_payment ¤Î¶èʬÍÑ |
---|
22 | define("ZERO_CREDIT_ID", 1); // dtb_payment ¤Î¶èʬÍÑ |
---|
23 | |
---|
24 | // Á÷¿®¥Ñ¥é¥á¡¼¥¿ |
---|
25 | define ("SEND_PARAM_CUSTOM", "yes"); |
---|
26 | define ("SEND_PARAM_ACT", "imode"); |
---|
27 | define ("SEND_PARAM_SEND", "jpall"); |
---|
28 | define ("SEND_PARAM_PC_URL", "https://credit.zeroweb.ne.jp/cgi-bin/order.cgi?orders"); |
---|
29 | define ("SEND_PARAM_MOBILE_URL", "https://credit.zeroweb.ne.jp/cgi-bin/order.cgi"); |
---|
30 | define ("SEND_PARAM_DELIMITER", "_"); // sendid¤Îʬ³äʸ»ú |
---|
31 | |
---|
32 | // ʸ»ú¿ôÀ©¸Â |
---|
33 | define ("CLIENTIP_LEN", 5); |
---|
34 | define ("SEND_LEN", 20); |
---|
35 | |
---|
36 | |
---|
37 | /**************************************************************************************************************
|
---|
38 | * ´Ø¿ô̾ ¡§sfPostPaymentData
|
---|
39 | * ½èÍýÆâÍÆ ¡§·èºÑ¥Ç¡¼¥¿Á÷¿®½èÍý
|
---|
40 | * °ú¿ô1 ¡§
|
---|
41 | * °ú¿ô2 ¡§
|
---|
42 | * °ú¿ô3 ¡§
|
---|
43 | * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì
|
---|
44 | **************************************************************************************************************/
|
---|
45 | function sfPostPaymentData($arrData, $arrInput){ |
---|
46 | $arrPost = array(
|
---|
47 | 'clientip' => '94181',
|
---|
48 | 'cardnumber' => $arrInput['card_no01'].$arrInput['card_no02'].$arrInput['card_no03'].$arrInput['card_no04'],
|
---|
49 | 'expyy' => $arrInput['card_year'],
|
---|
50 | 'expmm' => $arrInput['card_month'],
|
---|
51 | 'telno' => $arrData['order_tel01'].$arrData['order_tel02'].$arrData['order_tel03'],
|
---|
52 | 'email' => $arrData['order_mail'],
|
---|
53 | 'sendid' => $arrData['order_id'],
|
---|
54 | 'username' => $arrInput['card_name01'].$arrInput['card_name02'],
|
---|
55 | 'money' => $arrData['total'],
|
---|
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 | if(ereg('Success_order', $response)) {
|
---|
74 | print('À®¸ù');
|
---|
75 | } else {
|
---|
76 | print('¼ºÇÔ');
|
---|
77 | }
|
---|
78 | return $arrVal; |
---|
79 | }
|
---|
80 | /**************************************************************************************************************
|
---|
81 | * ´Ø¿ô̾ ¡§sfZeusDisp
|
---|
82 | * ½èÍýÆâÍÆ ¡§¶¦Ä̤Îɽ¼¨½èÍý
|
---|
83 | * °ú¿ô1 ¡§
|
---|
84 | * °ú¿ô2 ¡§
|
---|
85 | * °ú¿ô3 ¡§
|
---|
86 | * Ìá¤êÃÍ ¡§¼èÆÀ·ë²Ì
|
---|
87 | **************************************************************************************************************/
|
---|
88 | function sfZeusDisp($objPage, $payment_id) {
|
---|
89 | $objQuery = new SC_Query();
|
---|
90 | // »Ùʧ¤¤ÊýË¡¤ÎÀâÌÀ²èÁü¤ò¼èÆÀ¤¹¤ë¡£
|
---|
91 | $arrRet = $objQuery->select("payment_method, payment_image", "dtb_payment", "payment_id = ?", array($payment_id));
|
---|
92 | $objPage->tpl_payment_method = $arrRet[0]['payment_method'];
|
---|
93 | $objPage->tpl_payment_image = $arrRet[0]['payment_image'];
|
---|
94 | return $objPage;
|
---|
95 | } |
---|
96 | ?> |
---|