Pārlūkot izejas kodu

Merge branch 'master' into zhongqi-delivery

shish 8 mēneši atpakaļ
vecāks
revīzija
e4fdcec8b4

+ 2 - 2
common/components/delivery/platform/dada/Auth.php

@@ -45,14 +45,14 @@ class Auth
             // 生产环境配置(需要替换为实际的生产环境凭证)
             $this->appKey = 'dadaf2279d901a5ba40';
             $this->appSecret = '828a03677a1c00a3a5b3c59209c4433d';
-            $this->redirectUri = 'https://api.shop.hzghd.com/delivery/dada-auth-callback';
+            $this->redirectUri = Yii::$app->params['ghsHost'].'/delivery/dada-auth-callback';
             $this->authorizeUrl = self::AUTHORIZE_URL_PROD;
             $this->tokenUrl = self::TOKEN_URL_PROD;
         } else {
             // 测试环境配置
             $this->appKey = 'dadaf2279d901a5ba40';
             $this->appSecret = '828a03677a1c00a3a5b3c59209c4433d';
-            $this->redirectUri = 'https://api.shop.hzghd.com/delivery/dada-auth-callback';
+            $this->redirectUri = Yii::$app->params['ghsHost'].'/delivery/dada-auth-callback';
             $this->authorizeUrl = self::AUTHORIZE_URL_TEST;
             $this->tokenUrl = self::TOKEN_URL_TEST;
         }

+ 3 - 4
common/components/delivery/platform/huolala/Huolala.php

@@ -3,7 +3,7 @@ namespace common\components\delivery\platform\huolala;
 
 
 use common\components\delivery\helpers\SignHelper;
-
+use Yii;
 class Huolala
 {
     protected $baseUrl;
@@ -25,8 +25,7 @@ class Huolala
                 'base_url' => 'https://openapi.huolala.cn/v1',
                 'app_key' => 'gBhmCdWtX7hi7qnljduk0yK21XgQg8w3',
                 'secret' => 'bARxI68FFHpEXAcCQ23fxVQyxtJ9RONU',
-                //'notify_url' => 'https://api.shop.wixhb.com/delivery/huolala-callback', // TODO
-                'notify_url' => 'https://api.shop.hzghd.com/delivery/huolala-callback',
+                'notify_url' => Yii::$app->params['ghsHost'].'/delivery/huolala-callback',
             ];
             $this->isSandbox = false;
         } else {
@@ -34,7 +33,7 @@ class Huolala
                 'base_url' => 'https://openapi-pre.huolala.cn/v1',
                 'app_key' => '8S2uZQrWwM1mkG2Cj576PsMiNIe25UNT',
                 'secret' => 'olzor07UgmUWaagahNGQAKQKXRtvhK8j',
-                'notify_url' => 'https://api.shop.hzghd.com/delivery/huolala-callback',
+                'notify_url' => Yii::$app->params['ghsHost'].'/delivery/huolala-callback',
             ];
             $this->isSandbox = true;
         }

+ 4 - 4
common/components/delivery/services/AuthService.php

@@ -13,9 +13,9 @@ Class AuthService{
         //闪送授权(商户授权:授权后能为商户下所有门店发单)
         $auth = new \common\components\delivery\platform\shansong\Auth();
         if(getenv('YII_ENV') == 'production') {
-            //$apiHost = Yii::$app->params['ghsHost'];
+            $apiHost = Yii::$app->params['ghsHost'];
             // TODO 暂时修改为测试环境
-            $apiHost = 'https://api.shop.hzghd.com';
+            //$apiHost = 'https://api.shop.hzghd.com';
         } else {
             $apiHost = Yii::$app->params['ghsHost'];
         }
@@ -32,7 +32,7 @@ Class AuthService{
         $huoLalaAuth = new \common\components\delivery\platform\huolala\Auth();
         // $apiHost = Yii::$app->params['ghsHost'];
         // TODO 暂时修改为测试环境
-        $apiHost = 'https://api.shop.hzghd.com';
+        $apiHost = Yii::$app->params['ghsHost'];
         $redirectUrl = $apiHost . '/delivery/huolala-auth-callback' . '?mainId=' . $mainId;
         $authUrl = $huoLalaAuth->generateAuthUrl($redirectUrl);
 
@@ -45,7 +45,7 @@ Class AuthService{
         $fengnaioAuth = new \common\components\delivery\platform\fengniao\Auth();
         // $apiHost = Yii::$app->params['ghsHost'];
         // TODO 暂时修改为测试环境
-        $apiHost = 'https://api.shop.hzghd.com';
+        $apiHost = Yii::$app->params['ghsHost'];
         $redirectUrl = $apiHost . '/delivery/fengniao-auth-callback' . '?main_id=' . $mainId;
         $authUrl = $fengnaioAuth->generateAuthUrl($redirectUrl);