tranhistServiceClient.php 4.74 KB
<?php

error_reporting(E_ALL);

require_once 'nusoap/nusoap.php';

    $param = array();
    foreach ($_POST as $k => $v) {
        $param[$k] = $v;
    }
    
    if (isset($param['act'])) {
        switch($param['act']) {
        case 'tranhistByCard':
            $req = array(
                'accessKey' => $param['accessKey'],
                'cardNo' => $param['cardNo'],
                'limit' => $param['limit'],
                'offset' => $param['offset']
            );
            break;
        case 'tranhistDaily':
            $req = array(
                'accessKey' => $param['accessKey'],
                'targetDate' => $param['targetDate'],
                'limit' => $param['limit'],
                'offset' => $param['offset']
            );
            break;
        }
        $client = new nusoap_client('https://211.122.217.9/soap/services/TranhistService', false);
        $tranhistResult = $client->call($param['act'], $req, 'http://services.soap.valuecardservice.com');
    }
    
    if (!isset($param['accessKey'])) {
        $param['accessKey'] = 'r4KQyq8Q6H9x5XsDQa5MuiooN3WU';
    }
    if (!isset($param['termId'])) {
        $param['termId'] = '3061399854321';
    }
    
    
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:te="http://www.seasar.org/teeda/extension" xml:lang="ja" lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<title>phpclient</title>
</head>
<body>

<form method="post">
<table>
<tr>
<td>accessKey <input type="text" size="40" name="accessKey" value="<?php echo @$param['accessKey'] ?>" /></td>
<td>targetDate <input type="text" size="12" name="targetDate" value="<?php echo @$param['targetDate'] ?>" /></td>
<td>cardNo <input type="text" size="22" name="cardNo" value="<?php echo @$param['cardNo'] ?>" /></td>
<td>limit <input type="text" size="20" name="limit" value="<?php echo @$param['limit'] ?>" /></td>
<td>offset <input type="text" size="20" name="offset" value="<?php echo @$param['offset'] ?>" /></td>
<td></td>
</tr>
</table>
<input type="submit" name="act" value="tranhistDaily" />
<input type="submit" name="act" value="tranhistByCard" />
</form>

<hr/>

<?php if (@$tranhistResult) { ?>
<table border="1">
<tr>
<td>resultCode: <?php echo $tranhistResult['resultCode'] ?></td>
<td>errorMessage: <?php echo $tranhistResult['errorMessage'] ?></td>
<td>totalCount: <?php echo $tranhistResult['totalCount'] ?></td>
<td>count: <?php echo $tranhistResult['count'] ?></td>
<td>offset: <?php echo $tranhistResult['offset'] ?></td>
</tr>
</table>
<table border="1">
<tr>
<th>seqNo</th>
<th>dealNo</th>
<th>cardNo</th>
<th>receiptNo</th>
<th>reqClass</th>
<th>reqClassExp</th>
<th>depositValue</th>
<th>paidValue</th>
<th>sendbackValue</th>
<th>depositCancelValue</th>
<th>paidCancelValue</th>
<th>balanceTotal</th>
<th>paidBonusValue</th>
<th>issueBonusValue</th>
<th>couponBonusValue</th>
<th>lapseValue</th>
<th>lapseBonusValue</th>
<th>reqId</th>
<th>termId</th>
<th>hqshopId</th>
<th>hqshopName</th>
<th>shopId</th>
<th>shopName</th>
<th>regDate</th>
<th>dealNoCanceled</th>
<th>paidCouponValue</th>
<th>lapseCouponValue</th>
</tr>
<?php foreach ($tranhistResult['records'] as $record) { ?>
<tr>
<td><?php echo $record['seqNo'] ?></td>
<td><?php echo $record['dealNo'] ?></td>
<td><?php echo $record['cardNo'] ?></td>
<td><?php echo $record['receiptNo'] ?></td>
<td><?php echo $record['reqClass'] ?></td>
<td><?php echo $record['reqClassExp'] ?></td>
<td><?php echo $record['depositValue'] ?></td>
<td><?php echo $record['paidValue'] ?></td>
<td><?php echo $record['sendbackValue'] ?></td>
<td><?php echo $record['depositCancelValue'] ?></td>
<td><?php echo $record['paidCancelValue'] ?></td>
<td><?php echo $record['balanceTotal'] ?></td>
<td><?php echo $record['paidBonusValue'] ?></td>
<td><?php echo $record['issueBonusValue'] ?></td>
<td><?php echo $record['couponBonusValue'] ?></td>
<td><?php echo $record['lapseValue'] ?></td>
<td><?php echo $record['lapseBonusValue'] ?></td>
<td><?php echo $record['reqId'] ?></td>
<td><?php echo $record['termId'] ?></td>
<td><?php echo $record['hqshopId'] ?></td>
<td><?php echo $record['hqshopName'] ?></td>
<td><?php echo $record['shopId'] ?></td>
<td><?php echo $record['shopName'] ?></td>
<td><?php echo $record['regDate'] ?></td>
<td><?php echo $record['dealNoCanceled'] ?></td>
<td><?php echo $record['paidCouponValue'] ?></td>
<td><?php echo $record['lapseCouponValue'] ?></td>
</tr>
<?php } ?>
</table>
<?php } ?>

</body>
</html>