shish 2 年之前
父節點
當前提交
5b97ef5185
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 2 0
      app-ghs/controllers/OrderController.php
  2. 2 0
      common/components/lakala/Lakala.php

+ 2 - 0
app-ghs/controllers/OrderController.php

@@ -255,6 +255,7 @@ class OrderController extends BaseController
             if (isset($order->wxPayUrl) && !empty($order->wxPayUrl)) {
                 $url = $order->wxPayUrl;
             } else {
+                $merchantExtend = WxOpenClass::getWxInfo();
                 $merchantPrivateKeyPath = Yii::getAlias("@vendor/lakala") . '/production/api_private_key.pem';
                 $lklCertificatePath = Yii::getAlias("@vendor/lakala") . '/production/lkl-apigw-v1.cer';
                 $params = [
@@ -274,6 +275,7 @@ class OrderController extends BaseController
                     'notifyUrl' => $notifyUrl,
                     'subject' => $subject,
                     'couponId' => 0,
+                    'wxAppId' => $merchantExtend['miniAppId'],
                 ];
                 $response = $laResource->driveNativeWxPay($wxParams);
                 if (isset($response['code']) == false || $response['code'] != 'BBS00000') {

+ 2 - 0
common/components/lakala/Lakala.php

@@ -131,6 +131,7 @@ class Lakala
         $notifyUrl = $params['notifyUrl'];
         $subject = $params['subject'];
         $capitalType = $params['capitalType'];
+        $wxAppId = $params['wxAppId'] ?? '';
         $ip = $this->getClientIp();
         $location_info = ['request_ip' => $ip];
         $arr = [
@@ -146,6 +147,7 @@ class Lakala
             'remark' => '{"capitalType":' . $capitalType . '}',
             'acc_busi_fields' => [
                 'timeout_express' => 30,
+                'sub_appid' => $wxAppId,
             ],
         ];
         $baseRequestVO = [