|
|
@@ -109,10 +109,19 @@ class Model_apittv1 extends Lin_Model {
|
|
|
$url = 'https://open-api.tiktokglobalshop.com';
|
|
|
$link = '/fulfillment/202309/packages/'.$package_id.'/shipping_documents';
|
|
|
$time = time();
|
|
|
- $link .= '?shop_cipher='.$shop['shop_cipher'].'&app_key='.$shop['app_key'].'×tamp='.$time."&document_type=SHIPPING_LABEL";
|
|
|
- $url = $url.$link;
|
|
|
+ $querys = [
|
|
|
+ 'shop_cipher'=>$shop['shop_cipher'],
|
|
|
+ 'app_key'=>$shop['app_key'],
|
|
|
+ 'timestamp'=>$time,
|
|
|
+ 'document_type'=>'SHIPPING_LABEL'
|
|
|
+ ];
|
|
|
+ $sign = $this->sign($link,$querys,[],$shop['app_key']);
|
|
|
+
|
|
|
+ // $link .= '?shop_cipher='.$shop['shop_cipher'].'&app_key='.$shop['app_key'].'×tamp='.$time."&document_type=SHIPPING_LABEL";
|
|
|
+ $url = $url.$link."?".http_build_query($querys);
|
|
|
+ echo $url;
|
|
|
+ die;
|
|
|
$headers = array('Content-Type: application/json','x-tts-access-token:'.$shop['token']);
|
|
|
- $sign = $this->sign($url,$headers,[],$shop['app_key']);
|
|
|
$url .= $link.'&sign='.$sign;
|
|
|
$res = $this->reqGet($url,$headers);
|
|
|
if($res['httpCode'] != 200){
|