Browse Source

提交数据

lvhao 1 month ago
parent
commit
225d1db367
1 changed files with 11 additions and 11 deletions
  1. 11 11
      core/CoreApp/models/Model_api.php

+ 11 - 11
core/CoreApp/models/Model_api.php

@@ -112,10 +112,10 @@ function __construct(){
 			}
 			}
    	    	return $thatDayOrder;
    	    	return $thatDayOrder;
 		}
 		}
-		if(in_array($name,['alipearlstore','finsahair','baddiebeautyshop','yolissahair']))
+		if(in_array($name,['alipearlstore','finsahair','baddiebeautyshop','yolissahair','Yolissa']))
 		{
 		{
 			
 			
-				$post['shopify'] = $shopapi.'?status=any&limit=200';//?status=any所有订单 &limit=200每页多少单
+				$post['shopify'] = $shopapi.'?status=any&limit=2';//?status=any所有订单 &limit=200每页多少单
 				$ch = curl_init();
 				$ch = curl_init();
 				curl_setopt($ch,CURLOPT_URL,'https://edm.alipearl.net/soapapi.php');
 				curl_setopt($ch,CURLOPT_URL,'https://edm.alipearl.net/soapapi.php');
 				curl_setopt($ch, CURLOPT_POST, 1);
 				curl_setopt($ch, CURLOPT_POST, 1);
@@ -129,6 +129,7 @@ function __construct(){
 				$res = curl_exec($ch);
 				$res = curl_exec($ch);
 				$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy_1【".$name."】".json_encode($post));
 				$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy_1【".$name."】".json_encode($post));
 				$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy_2【".$name."】".$res);
 				$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy_2【".$name."】".$res);
+				
 				curl_close($ch);
 				curl_close($ch);
 				$res = json_decode($res,true);
 				$res = json_decode($res,true);
 
 
@@ -149,25 +150,25 @@ function __construct(){
 							$skus .= ($key > 0)?','.$val['sku']:$val['sku'];
 							$skus .= ($key > 0)?','.$val['sku']:$val['sku'];
 							$quantity .= floor($val['quantity']).';';
 							$quantity .= floor($val['quantity']).';';
 						}
 						}
-						if(stripos($v['gateway'],'shopify_') !== false)
+						if(stripos($v['payment_gateway_names'][0],'shopify_') !== false)
 						{
 						{
 							$pay = 'shopifypay';
 							$pay = 'shopifypay';
 						}
 						}
-						else if(stripos($v['gateway'],'paypal') !== false)
+						else if(stripos($v['payment_gateway_names'][0],'paypal') !== false)
 						{
 						{
 							$pay = 'paypal_express';
 							$pay = 'paypal_express';
 						}
 						}
-						else if(stripos($v['gateway'],'gift_card') !== false)
+						else if(stripos($v['payment_gateway_names'][0],'gift_card') !== false)
 						{
 						{
 							$pay = 'gift_card';
 							$pay = 'gift_card';
 						}
 						}
-						else if(stripos($v['gateway'],'shop_cash') !== false)
+						else if(stripos($v['payment_gateway_names'][0],'shop_cash') !== false)
 						{
 						{
 							$pay = 'shop_cash';
 							$pay = 'shop_cash';
 						}
 						}
 						else
 						else
 						{
 						{
-							$pay = $v['gateway'];
+							$pay = $v['payment_gateway_names'][0];
 						}
 						}
 						$khbz = '';
 						$khbz = '';
 						if(!isset($v['shipping_address']['country_code']))
 						if(!isset($v['shipping_address']['country_code']))
@@ -498,12 +499,12 @@ function __construct(){
 	}
 	}
 	public function authorization($shop,$shopifyid)//shopify获取交易号
 	public function authorization($shop,$shopifyid)//shopify获取交易号
     {
     {
-		if($shop['name'] == 'yolissahair'){
+		if($shop['brandname'] == 'yolissahair'){
 			$shopname = 'xxu7p0-3q';
 			$shopname = 'xxu7p0-3q';
-		}elseif ($shop['name'] == 'Yolissa') {
+		}elseif ($shop['brandname'] == 'Yolissa') {
 		    $shopname = 'xxu7p0-3q';
 		    $shopname = 'xxu7p0-3q';
 		}else{
 		}else{
-		    $shopname = $shop['name'];
+		    $shopname = $shop['brandname'];
 		}
 		}
 		$post = [];
 		$post = [];
 		$post['shopify_pay'] = [
 		$post['shopify_pay'] = [
@@ -524,7 +525,6 @@ function __construct(){
 		curl_close($ch);
 		curl_close($ch);
 		$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy【".$shopifyid."】".$res."}{".json_encode($post));
 		$this->logic_ding->sendToDing("独立站获取订单的店铺执行shopfiy【".$shopifyid."】".$res."}{".json_encode($post));
 		$a = json_decode($res,true);
 		$a = json_decode($res,true);
-
 		// $shopifyid = $shopifyid;
 		// $shopifyid = $shopifyid;
 		// $url = 'https://'.$shop['shopname'].'.myshopify.com/admin/api/2022-10/orders/'.$shopifyid.'/transactions.json';
 		// $url = 'https://'.$shop['shopname'].'.myshopify.com/admin/api/2022-10/orders/'.$shopifyid.'/transactions.json';
         // 	$headerA[] = "X-Shopify-Access-Token: ".$shop['token'];
         // 	$headerA[] = "X-Shopify-Access-Token: ".$shop['token'];