source: temp/trunk/html/test/naka/shopcgi.php @ 7750

Revision 7750, 1.9 KB checked in by naka, 20 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2
3require_once("../../require.php");
4require_once(DATA_PATH . "module/Request.php");
5
6/*
7
8from index2.html
9
10Array
11(
12    [TenantNo] => 11111111
13    [OrderId] => 2006-11-08-11-39-53-966
14    [JobCd] => CHECK
15    [Amount] =>
16    [Tax] =>
17    [Currency] =>
18    [Memo] =>
19)
20
21*/
22
23/*
24
25¥»¥ó¥¿¤Ø¤ÎÁ÷¿®¥Ç¡¼¥¿
26
27OrderId=>2006-11-08-12-43-21-935
28TdTenantName=>
29TdFlag=>
30ShopId=>test
31Amount=>0
32ShopPass=>test
33Currency=>
34Tax=>0
35JobCd=>CHECK
36TenantNo=>TenantNo
37
38*/
39
40$order_url = "http://mod-i.ccsware.net/ohayou/EntryTran.php";
41
42// ŹÊÞ¾ðÊó¤ÎÁ÷¿®
43$arrData = array(
44    'OrderId' => sfGetUniqRandomId(),   // ŹÊÞ¤´¤È¤Ë°ì°Õ¤ÊÃíʸID¤òÁ÷¿®¤¹¤ë¡£
45    'TdTenantName' => '',
46    'TdFlag' => '',
47    'ShopId' => 'test',
48    'Amount' => '100',
49    'ShopPass' => 'test',
50    'Currency' => 'JPN',
51    'Tax' => '5',
52    'JobCd' => 'CHECK',
53    'TenantNo' => '111111111',          // cgi-4¤ÇºîÀ®¤·¤¿Å¹ÊÞID¤òÁ÷¿®¤¹¤ë¡£
54);
55
56$req = new HTTP_Request($order_url);
57$req->setMethod(HTTP_REQUEST_METHOD_POST);
58       
59$arrSendData = array();
60$req->addPostDataArray($arrData);
61
62if (!PEAR::isError($req->sendRequest())) {
63    $response = $req->getResponseBody();
64} else {
65    $response = "";
66}
67$req->clearPostData();
68
69if($response != "") {
70    $arrTemp = split("&", $response);
71    foreach($arrTemp as $ret) {
72        list($key, $val) = split("=", $ret);
73        $arrRet[$key] = $val;
74    }
75}
76
77sfPrintR($arrRet);
78
79// ·èºÑ¾ðÊó¤ÎÁ÷¿®
80
81/*
82    [AccessId] => 60f511479544541eb1ec9dc6f700b8c1
83    [AccessPass] => 925a413ce991e7b9230fbc575b9dc430
84    [OrderId] => 2006-11-08-13-08-07-732
85    [RetURL] => http://test.ec-cube.net/cgi-bin/ShopCGI/cgi-1/ShopBuy.pl
86    [CardType] => VISA,     11111, 111111111111111111111111111111111111, 1111111111
87    [Method] => 2
88    [PayTimes] => 4
89    [CardNo1] => 4111
90    [CardNo2] => 1111
91    [CardNo3] => 1111
92    [CardNo4] => 1111
93    [ExpireMM] => 06
94    [ExpireYY] => 07
95    [ClientFieldFlag] => 1
96    [ClientField1] => f1
97    [ClientField2] => f2
98    [ClientField3] => f3
99*/
100
101
102
103?>
Note: See TracBrowser for help on using the repository browser.