wesmiler 1 месяц назад
Родитель
Сommit
349ee691a3
1 измененных файлов с 2 добавлено и 5 удалено
  1. 2 5
      app/Services/PaymentService.php

+ 2 - 5
app/Services/PaymentService.php

@@ -88,7 +88,7 @@ class PaymentService extends BaseService
                 if ($payPt == 'min') {
                     // 小程序支付
                     $payConfig['wechat']['default']['mini_app_id'] = $minAppid ? $minAppid : $appid;
-                } else if ($payPt == 'mp') {
+                } else if ($payPt == 'mp' || $scene == 'sharing') {
                     // 公众号
                     $payConfig['wechat']['default']['mp_app_id'] = $mpAppid ? $mpAppid : $appid;
                 } else {
@@ -688,9 +688,6 @@ class PaymentService extends BaseService
         // 添加分账插件配置
         $pay->pay($plugin, $data);
 
-        $config = ConfigService::make()->getConfigOptionByGroup(6);
-        $minAppid = isset($config['wxpay_min_appid']) ? $config['wxpay_min_appid'] : '';
-
         // 分账数据
         $transactionId = isset($order['transaction_id'])? $order['transaction_id'] : ''; // 支付交易单号
         $profitsharingOrderNo = isset($order['out_order_no'])? $order['out_order_no'] : ''; // 分账单号,非支付单号
@@ -698,7 +695,6 @@ class PaymentService extends BaseService
         $amount = isset($order['amount'])? $order['amount'] : ''; // 分账金额
         $unsplit = isset($order['unsplit'])? $order['unsplit'] : true; // 是否限制只分账一次
         $postData = [
-            'appid' => $minAppid,
             'transaction_id' => $transactionId,
             'out_order_no' => $profitsharingOrderNo,
             'receivers' => [
@@ -712,6 +708,7 @@ class PaymentService extends BaseService
             'unfreeze_unsplit' => $unsplit,
         ];
 
+        var_dump($postData);
         // 创建分账数据
         $createPlugin = $pay->mergeCommonPlugins([
             CreatePlugin::class