首页 加油卡充值 加油卡充值示例代码 查询加油卡订单列表[PHP]

查询加油卡订单列表示例代码[PHP]

作者: 阅读数:1841 上传时间:2016-03-10

查询加油卡订单列表

<?php

require 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$pagenum = 1;//当前页
$pagesize = 20;//每页数量,最大20
$url = "https://api.jisuapi.com/fuelcardrecharge/orderlist?appkey=$appkey&pagenum=$pagenum&pagesize=$pagesize";
$result = curlOpen($url, ['ssl'=>true]);

$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
echo $result['total'].' '.$result['pagesize'].' '.$result['pagenum'].'
'; foreach($result['list'] as $val) { echo $val['orderno'].' '.$val['outorderno'].'
'; echo $val['account'].' '.$val['num'].'
'; echo $val['status'].' '.$val['rechargestatus'].'
'; echo $val['amount'].' '.$val['totalfee'].'
'; echo $val['type'].' '.$val['addtime'].'

'; }