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