首页 违章代办 违章代办示例代码 提交代办订单[PHP]

提交代办订单示例代码[PHP]

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

提交代办订单

<?php

require 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$illegalid = '1333,1334';//违章ID
$mobile = '15158825888';
$outorderno = '';
$appsecret = 'your_appsecret_here';
$queryarr = array('mobile'=>$mobile,'illegalid'=>$illegalid,'outorderno'=>$outorderno);
$sign = makeSign($queryarr, $appsecret);
$url = "https://api.jisuapi.com/illegalhandle/handle?appkey=$appkey&mobile=$mobile&illegalid=$illegalid&outorderno=$outorderno";
$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['mobile'].' '.$result['illegalid'].' '.$result['outorderno'].'
'; echo $result['orderno'].' '.$result['totalfee'].' '.$result['servicefee'].'
'; echo $result['lsprefix'].' '.$result['lsnum'].' '.$result['handlestatus'].'
';