You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
<?php
|
|
defined('IN_IA') or exit('Access Denied');
|
|
|
|
/**
|
|
* Comment: 模板消息操作模型
|
|
* Author: zzw
|
|
* Class Template
|
|
*/
|
|
class FollowWaybill
|
|
{
|
|
|
|
public static function followWaybill($nowToken = false)
|
|
{
|
|
global $_W;
|
|
|
|
$member = pdo_get(PDO_NAME . 'member',['id' => $_W['mid']],['openid']);
|
|
|
|
try {
|
|
$accessToken = WeliamWeChat::getAccessToken($nowToken); //token信息获取
|
|
$http = "https://api.weixin.qq.com/cgi-bin/express/delivery/open_msg/follow_waybill?access_token={$accessToken}";
|
|
$data = [
|
|
'openid' => trim($member['openid']),
|
|
'sender_phone' => '',
|
|
'receiver_phone' => '',
|
|
'delivery_id' => '',
|
|
'waybill_id' => '',
|
|
'goods_info' => [],
|
|
'trans_id' => '',
|
|
'order_detail_path' => '',
|
|
];
|
|
$headers = [
|
|
"Content-type: application/json;charset='utf-8'" ,
|
|
"Accept: application/json" ,
|
|
"Cache-Control: no-cache" ,
|
|
"Pragma: no-cache"
|
|
];
|
|
$res = curlPostRequest($http,\GuzzleHttp\json_encode($data,JSON_UNESCAPED_UNICODE),$headers);
|
|
} catch ($e) {
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|