lvhao 2 тижнів тому
батько
коміт
6578e48116

+ 1 - 1
core/CoreApp/controllers/Aatest.php

@@ -96,7 +96,7 @@ class Aatest extends Start_Controller {
 		echo "<pre>";
 		echo "<pre>";
 		$info = $this->logic_order->getInfo("number = 'TT-WK-260124-053'");
 		$info = $this->logic_order->getInfo("number = 'TT-WK-260124-053'");
 		$shop = $this->shop->read($info['shop']);
 		$shop = $this->shop->read($info['shop']);
-		$r = $this->apitt->get_je($info,$shop);
+		$r = $this->apitt->getPayInfo($info['orderinfo'],$shop);
 		print_r($r);
 		print_r($r);
 		die;
 		die;
 		$info = $this->logic_order->getInfo("number = 'TT-WK-260124-053'");
 		$info = $this->logic_order->getInfo("number = 'TT-WK-260124-053'");

+ 13 - 0
core/CoreApp/models/Model_apitt.php

@@ -567,6 +567,19 @@ function __construct(){
 
 
 	}
 	}
 
 
+	public function getPayInfo($order_id,$shop){
+		$url = 'https://open-api.tiktokglobalshop.com';
+		$link = '/order/202407/orders/'.$order_id.'/price_detail';
+		$time = time();
+		$link .= '?shop_cipher='.$shop['shop_cipher'].'&app_key='.$shop['app_key'].'&timestamp='.$time.'&ids='.$order_id;
+		$sign = $this->sign($link,$shop['app_secret'],'');
+		$url .= $link.'&sign='.$sign;
+		$headers = array('Content-Type: application/json','x-tts-access-token:'.$shop['token']);
+		$res = $this->su_curl('',$url,$headers,$date_type='json',$timeout=300,$httptype="GET");
+		$res = json_decode($res,true);
+		return $res;
+	}
+
 
 
 
 
 	public function get_detail($order_id,$shop){
 	public function get_detail($order_id,$shop){