首页 快递散件下单 快递散件下单示例代码 更新订单[PHP]

更新订单示例代码PHP

作者: 阅读数:1128 上传时间:2025-03-28

更新订单

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey

$url = "https://api.jisuapi.com/expressorder/update?appkey=$appkey";
$appsecret = 'ssssssssssss';
$post = ['type'=>'', 'senderprovince'=>'', 'sendercity'=>'', 'sendertown'=>'', 'senderaddress'=>'', 'sendername'=>'', 'sendermobile'=>'', 'sendertel'=>'', 'sendercompany'=>'', 'senderzipcode'=>'', 'addresseeprovince'=>'', 'addresseecity'=>'', 'addresseetown'=>'', 'addresseeaddress'=>'', 'addresseename'=>'', 'addresseemobile'=>'', 'addresseetel'=>'', 'addresseecompany'=>'', 'addresseezipcode'=>'', 'product'=>'', 'ordertype'=>'', 'orderremark'=>'', 'accountid'=>'', 'password'=>'', 'weight'=>'', 'dimension'=>'', 'freighttype'=>'', 'producttype'=>'', 'freight'=>'', 'isnotice'=>'', 'starttime'=>'', 'endtime'=>'', 'collectionamount'=>'', 'insuredamount'=>''];//不包含appkey
$post['sign'] = makeSign($post, $appsecret);
$result = curlOpen($url, ['ssl'=>true, 'post'=>$post]);

$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
echo $result['orderno'];