首页 违章代办 违章代办示例代码 获取订单列表[PHP]

获取订单列表示例代码[PHP]

作者: 阅读数:2010 上传时间:

获取订单列表

<?php

require 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$pagenum = 1;//当前页
$pagesize = 20;//每页数量,最大20
$url = "https://api.jisuapi.com/illegalhandle/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['mobile'].' '.$val['usercarid'].'
'; echo $val['status'].' '.$val['handlestatus'].'
'; echo $val['service'].' '.$val['totalfee'].'
'; echo $val['addtime'].'

'; }