发货信息录入
报错:
string(88) "{"errcode":47007,"errmsg":"data format error, not UTF8 rid: 6850d674-1c545607-04199ba1"}"
是什么问题,以下为php代码:
$api_url = 'https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token=' . $access_token;
$current_time = new DateTime();
$param_array = array(
"order_key" => array(
"order_number_type" => 2,//订单单号类型,用于确认需要上传详情的订单。枚举值1,使用下单商户号和商户侧单号;枚举值2,使用微信支付单号
"transaction_id"=>$payorder_code,
// 'mchid'=> $this->mchId,
// "out_trade_no" => $payorder_code
),
"delivery_mode" => 1,
"logistics_type" => 4,// 4、用户自提
"shipping_list" => array(
array(
"item_desc" => "新美耶美妆服务",
)
),
"upload_time" => $current_time->format(DATE_RFC3339),
"payer" => array(
"openid" =>$order_open_id
)
);
$res = $this->https_post($api_url, json_encode($param_array));
$arr = json_decode($res, true);
var_dump($res);
你好,日志查看有中文乱码
{"order_key":{"order_number_type":2,"transaction_id":"4200002695202506166165063576"},"delivery_mode":1,"logistics_type":4,"shipping_list":[{"item_desc":"\u65b0\u7f8e\u8036\u7f8e\u5986\u670d\u52a1"}],"upload_time":"2025-06-17T10:44:04+08:00","payer":{"openid":"oTdWN7e5faKeZyphP7bx2OvK9XW0"}}
为什么有时候可以有时又不行
string(279) "{"order_key":{"order_number_type":2,"transaction_id":"4200002698202506162478585420"},"delivery_mode":1,"logistics_type":4,"shipping_list":[{"item_desc":"\u65b0\u7f8e\u8036\u7f8e\u5986"}],"upload_time":"2025-06-17T11:10:04+08:00","payer":{"openid":"oTdWN7e5faKeZyphP7bx2OvK9XW0"}}" string(27) "{"errcode":0,"errmsg":"ok"}"