Changeset 7794 for temp/trunk/html


Ignore:
Timestamp:
2006/11/08 16:12:36 (20 years ago)
Author:
naka
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/test/naka/shopcgi.php

    r7793 r7794  
    44require_once(DATA_PATH . "module/Request.php"); 
    55 
    6 /* 
    7  
    8 from index2.html 
    9  
    10 Array 
    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  
    27 OrderId=>2006-11-08-12-43-21-935 
    28 TdTenantName=> 
    29 TdFlag=> 
    30 ShopId=>test 
    31 Amount=>0 
    32 ShopPass=>test 
    33 Currency=> 
    34 Tax=>0 
    35 JobCd=>CHECK 
    36 TenantNo=>TenantNo 
    37  
    38 */ 
    39  
    406$entry_url = "http://mod-i.ccsware.net/ohayou/EntryTran.php"; 
    417$exec_url = "https://mod-i.ccsware.net/ohayou/ExecTran.php"; 
     8// ¼õÃíÈÖ¹æ¤Î¼èÆÀ 
    429$order_id = sfGetUniqRandomId(); 
    4310 
     
    6734} 
    6835$req->clearPostData(); 
    69  
    70 if($response != "") { 
    71     $response = ereg_replace("[\n\r]", "", $response); 
    72     $arrTemp = split("&", $response); 
    73     foreach($arrTemp as $ret) { 
    74         list($key, $val) = split("=", $ret); 
    75         $arrRet[$key] = $val; 
    76     } 
    77 } 
    78  
    79 sfPrintR($arrRet); 
     36$arrRet = lfGetPostArray($response); 
    8037 
    8138// ·èºÑ¾ðÊó¤ÎÁ÷¿® 
    82 /* 
    83     [AccessId] => 60f511479544541eb1ec9dc6f700b8c1 
    84     [AccessPass] => 925a413ce991e7b9230fbc575b9dc430 
    85     [OrderId] => 2006-11-08-13-08-07-732 
    86     [RetURL] => http://test.ec-cube.net/cgi-bin/ShopCGI/cgi-1/ShopBuy.pl 
    87     [CardType] => VISA,     11111, 111111111111111111111111111111111111, 1111111111 
    88     [Method] => 2 
    89     [PayTimes] => 4 
    90     [CardNo1] => 4111 
    91     [CardNo2] => 1111 
    92     [CardNo3] => 1111 
    93     [CardNo4] => 1111 
    94     [ExpireMM] => 06 
    95     [ExpireYY] => 07 
    96     [ClientFieldFlag] => 1 
    97     [ClientField1] => f1 
    98     [ClientField2] => f2 
    99     [ClientField3] => f3 
    100 */ 
    10139$arrData = array( 
    10240    'AccessId' => $arrRet['ACCESS_ID'], 
     
    12058); 
    12159 
    122 sfPrintR($arrData); 
    123  
    12460$req = new HTTP_Request($exec_url); 
    12561$req->setMethod(HTTP_REQUEST_METHOD_POST); 
     
    13470$req->clearPostData(); 
    13571 
    136 print("<!--"); 
    137 sfPrintR($response); 
    138 print("-->"); 
     72$arrRet = lfGetPostArray($response); 
    13973 
     74sfPrintR($arrRet); 
     75 
     76//--------------------------------------------------------------------------------------------------------------------------------- 
     77function lfGetPostArray($text) { 
     78    if($text != "") { 
     79        $text = ereg_replace("[\n\r]", "", $text); 
     80        $arrTemp = split("&", $text); 
     81        foreach($arrTemp as $ret) { 
     82            list($key, $val) = split("=", $ret); 
     83            $arrRet[$key] = $val; 
     84        } 
     85    } 
     86    return $arrRet; 
     87} 
    14088?> 
Note: See TracChangeset for help on using the changeset viewer.