小程序
小游戏
企业微信
微信支付
扫描小程序码分享
昨天用这个接口添加了一个打印人员,今天在想添加人员一直提示48001。删除昨天添加的也没法操作。
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
获取快递单号的接口,有的时候能返回值,有的时候返回不出值
appid :wxae2f44315b70f177
$orderUrl="https://api.weixin.qq.com/cgi-bin/express/business/order/add?access_token=".$access_token;
$order=M('order')->where('id='.$order_id)->field('uid,order_sn,address_xq,product_num,name,tel,receiver,photo_x')->find();
$user=M('user')->where('id='.$order['uid'])->field('openid')->find();
$postdata['add_source']=0;
$postdata['order_id']=$order['order_sn'];
$postdata['openid']=$user['openid'];
$postdata['delivery_id']='YUNDA';
$postdata['biz_id']='11111';
//发件人
$postdata['sender']['name']=$j_name;
$postdata['sender']['mobile']=$j_tel;
$postdata['sender']['province']='辽宁省';
$postdata['sender']['city']='盘锦市';
$postdata['sender']['area']='111';
$postdata['sender']['address']='111';
//收件人
$address_arr= explode(" ",$order['address_xq']);
$postdata['receiver']['name']=$order['receiver'];
$postdata['receiver']['mobile']=$order['tel'];
$postdata['receiver']['province']=$address_arr[0];
$postdata['receiver']['city']=$address_arr[1];
$postdata['receiver']['area']=$address_arr[2];
$postdata['receiver']['address']=$address_arr[3];
// 包裹信息,将传递给快递公司
$postdata['cargo']['count']=$order['product_num'];
$postdata['cargo']['weight']='10';
$postdata['cargo']['space_x']='50';
$postdata['cargo']['space_y']='50';
$postdata['cargo']['space_z']='50';
$postdata['cargo']['detail_list']['name']=$order['name'];
$postdata['cargo']['detail_list']['count']=$order['product_num'];
//商品信息,会展示到物流服务通知和电子面单中
$photo=__DATAURL__.$order['photo_x'];
$postdata['shop']['wxa_path']=$wx_url;
$postdata['shop']['img_url']=$photo;
$postdata['shop']['goods_name']=$order['name'];
$postdata['shop']['goods_count']=$order['product_num'];
//保价信息
$postdata['insured']['use_insured']='0';
$postdata['insured']['insured_value']='0';
//服务类型
$postdata['service']['service_type']='0'; //服务类型ID
$postdata['service']['service_name']='标准快件'; //服务名称
$postdatas=json_encode($postdata,JSON_UNESCAPED_UNICODE);
$success=$this->Post_M($orderUrl,$postdatas);
$success = json_decode($success,true);
return $success;
返回的值:array(2) { ["errcode"]=> int(48001) ["errmsg"]=> string(44) "api unauthorized hints: [xDECIOLoRa-7RtlwA!]" }
操作时间:2020/6/10 8:49
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
你好,这个是指没有权限,可以检查一下。若还有疑问,请提供appid、完整的请求、返回信息、操作时间
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
获取快递单号的接口,有的时候能返回值,有的时候返回不出值
appid :wxae2f44315b70f177
$orderUrl="https://api.weixin.qq.com/cgi-bin/express/business/order/add?access_token=".$access_token;
$order=M('order')->where('id='.$order_id)->field('uid,order_sn,address_xq,product_num,name,tel,receiver,photo_x')->find();
$user=M('user')->where('id='.$order['uid'])->field('openid')->find();
$postdata['add_source']=0;
$postdata['order_id']=$order['order_sn'];
$postdata['openid']=$user['openid'];
$postdata['delivery_id']='YUNDA';
$postdata['biz_id']='11111';
//发件人
$postdata['sender']['name']=$j_name;
$postdata['sender']['mobile']=$j_tel;
$postdata['sender']['province']='辽宁省';
$postdata['sender']['city']='盘锦市';
$postdata['sender']['area']='111';
$postdata['sender']['address']='111';
//收件人
$address_arr= explode(" ",$order['address_xq']);
$postdata['receiver']['name']=$order['receiver'];
$postdata['receiver']['mobile']=$order['tel'];
$postdata['receiver']['province']=$address_arr[0];
$postdata['receiver']['city']=$address_arr[1];
$postdata['receiver']['area']=$address_arr[2];
$postdata['receiver']['address']=$address_arr[3];
// 包裹信息,将传递给快递公司
$postdata['cargo']['count']=$order['product_num'];
$postdata['cargo']['weight']='10';
$postdata['cargo']['space_x']='50';
$postdata['cargo']['space_y']='50';
$postdata['cargo']['space_z']='50';
$postdata['cargo']['detail_list']['name']=$order['name'];
$postdata['cargo']['detail_list']['count']=$order['product_num'];
//商品信息,会展示到物流服务通知和电子面单中
$photo=__DATAURL__.$order['photo_x'];
$postdata['shop']['wxa_path']=$wx_url;
$postdata['shop']['img_url']=$photo;
$postdata['shop']['goods_name']=$order['name'];
$postdata['shop']['goods_count']=$order['product_num'];
//保价信息
$postdata['insured']['use_insured']='0';
$postdata['insured']['insured_value']='0';
//服务类型
$postdata['service']['service_type']='0'; //服务类型ID
$postdata['service']['service_name']='标准快件'; //服务名称
$postdatas=json_encode($postdata,JSON_UNESCAPED_UNICODE);
$success=$this->Post_M($orderUrl,$postdatas);
$success = json_decode($success,true);
return $success;
返回的值:array(2) { ["errcode"]=> int(48001) ["errmsg"]=> string(44) "api unauthorized hints: [xDECIOLoRa-7RtlwA!]" }
操作时间:2020/6/10 8:49
你好,这个是指没有权限,可以检查一下。若还有疑问,请提供appid、完整的请求、返回信息、操作时间
appid :wxae2f44315b70f177
$orderUrl="https://api.weixin.qq.com/cgi-bin/express/business/order/add?access_token=".$access_token;
$order=M('order')->where('id='.$order_id)->field('uid,order_sn,address_xq,product_num,name,tel,receiver,photo_x')->find();
$user=M('user')->where('id='.$order['uid'])->field('openid')->find();
$postdata['add_source']=0;
$postdata['order_id']=$order['order_sn'];
$postdata['openid']=$user['openid'];
$postdata['delivery_id']='YUNDA';
$postdata['biz_id']='11111';
//发件人
$postdata['sender']['name']=$j_name;
$postdata['sender']['mobile']=$j_tel;
$postdata['sender']['province']='辽宁省';
$postdata['sender']['city']='盘锦市';
$postdata['sender']['area']='111';
$postdata['sender']['address']='111';
//收件人
$address_arr= explode(" ",$order['address_xq']);
$postdata['receiver']['name']=$order['receiver'];
$postdata['receiver']['mobile']=$order['tel'];
$postdata['receiver']['province']=$address_arr[0];
$postdata['receiver']['city']=$address_arr[1];
$postdata['receiver']['area']=$address_arr[2];
$postdata['receiver']['address']=$address_arr[3];
// 包裹信息,将传递给快递公司
$postdata['cargo']['count']=$order['product_num'];
$postdata['cargo']['weight']='10';
$postdata['cargo']['space_x']='50';
$postdata['cargo']['space_y']='50';
$postdata['cargo']['space_z']='50';
$postdata['cargo']['detail_list']['name']=$order['name'];
$postdata['cargo']['detail_list']['count']=$order['product_num'];
//商品信息,会展示到物流服务通知和电子面单中
$photo=__DATAURL__.$order['photo_x'];
$postdata['shop']['wxa_path']=$wx_url;
$postdata['shop']['img_url']=$photo;
$postdata['shop']['goods_name']=$order['name'];
$postdata['shop']['goods_count']=$order['product_num'];
//保价信息
$postdata['insured']['use_insured']='0';
$postdata['insured']['insured_value']='0';
//服务类型
$postdata['service']['service_type']='0'; //服务类型ID
$postdata['service']['service_name']='标准快件'; //服务名称
$postdatas=json_encode($postdata,JSON_UNESCAPED_UNICODE);
$success=$this->Post_M($orderUrl,$postdatas);
$success = json_decode($success,true);
return $success;
返回的值:array(2) { ["errcode"]=> int(48001) ["errmsg"]=> string(44) "api unauthorized hints: [xDECIOLoRa-7RtlwA!]" }
操作时间:2020/6/10 8:49