|
@@ -459,6 +459,26 @@ function __construct(){
|
|
|
$res = json_decode($res,true);
|
|
$res = json_decode($res,true);
|
|
|
return $res;
|
|
return $res;
|
|
|
}
|
|
}
|
|
|
|
|
+ //商家自定义发货 但是用的tiktok的渠道
|
|
|
|
|
+ public function ShipByTiktok($pachage_id,$shop,$info){
|
|
|
|
|
+ $url = 'https://open-api.tiktokglobalshop.com';
|
|
|
|
|
+ $link = "/fulfillment/202309/packages/".$pachage_id."/ship";
|
|
|
|
|
+ $time = time();
|
|
|
|
|
+ $post = [
|
|
|
|
|
+ "handover_method"=>"DROP_OFF"
|
|
|
|
|
+ ];
|
|
|
|
|
+ $queryParams['shop_cipher'] =$shop['shop_cipher'];
|
|
|
|
|
+ $queryParams['app_key'] =$shop['app_key'];
|
|
|
|
|
+ $queryParams['timestamp'] =$time;
|
|
|
|
|
+ $link .= '?'.http_build_query($queryParams);
|
|
|
|
|
+ $sign = $this->sign($link,$shop['app_secret'],$post);
|
|
|
|
|
+ $url .= $link.'&sign='.$sign;
|
|
|
|
|
+ $headers = array('Content-Type: application/json','x-tts-access-token:'.$shop['token']);
|
|
|
|
|
+ $res = $this->su_curl($post,$url,$headers);
|
|
|
|
|
+ $this->logic_ding->sendToDing($info['number']."获取通过TT快递服务信息".$res);
|
|
|
|
|
+ $res = json_decode($res,true);
|
|
|
|
|
+ return $res;
|
|
|
|
|
+ }
|
|
|
//创建运单
|
|
//创建运单
|
|
|
public function createLabel($info,$shop){
|
|
public function createLabel($info,$shop){
|
|
|
$url = 'https://open-api.tiktokglobalshop.com';
|
|
$url = 'https://open-api.tiktokglobalshop.com';
|