shish 5 anni fa
parent
commit
7d19493e01

+ 3 - 0
biz-ghs/order/services/OrderService.php

@@ -615,7 +615,9 @@ class OrderService extends BaseService
             $merchantExt = WxOpenClass::getWxInfo();
             $mid = $merchantExt['wxPayMerchantId'] ?? '';
             $appId = $merchantExt['miniAppId'] ?? '';
+            $key = $merchantExt['wxPayKey'] ?? '';
 
+            Yii::info($mid . ' ' . $appId . ' 88888 ');
 
             $input = new \WxPayRefund();
             $input->SetTransaction_id($transaction_id);
@@ -625,6 +627,7 @@ class OrderService extends BaseService
             $config = new \WxPayConfig();
             $config->SetAppId($appId);
             $config->SetMerchantId($mid);
+            $config->SetKey($key);
 
             $input->SetOut_refund_no($refundOrderSn);
             $input->SetOp_user_id($mid);

+ 8 - 2
vendor/wxPayApi_v3.0.10/example/WxPay.Config.php

@@ -19,7 +19,7 @@ require_once($wx . '/lib/WxPay.Config.Interface.php');
 class WxPayConfig extends WxPayConfigInterface
 {
 
-    public $appId = '', $merchantId = '';
+    public $appId = '', $merchantId = '',$key='';
 
     public function SetAppId($appId)
     {
@@ -31,6 +31,12 @@ class WxPayConfig extends WxPayConfigInterface
         $this->merchantId = $merchantId;
     }
 
+    public function SetKey($key)
+    {
+        $this->key = $key;
+    }
+
+
     //=======【基本信息设置】=====================================
 
     /**
@@ -109,7 +115,7 @@ class WxPayConfig extends WxPayConfigInterface
      */
     public function GetKey()
     {
-        return '';
+        return $this->key;
     }
 
     public function GetAppSecret()