shish 4 سال پیش
والد
کامیت
410189a413
2فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 2 1
      app-mall/controllers/NoticeController.php
  2. 5 5
      app-pt/controllers/CashController.php

+ 2 - 1
app-mall/controllers/NoticeController.php

@@ -97,6 +97,7 @@ class NoticeController extends PublicController
         $total_fee = $postObj->total_fee;
         $totalFee = $total_fee / 100;
         $attach = $postObj->attach;
+        $transactionId = $postObj->transaction_id ?? '';
         //接收流水类型、代金劵
         parse_str($attach);
         //流水类型
@@ -110,7 +111,7 @@ class NoticeController extends PublicController
         try {
             $wxPay = dict::getDict('payWay', 'wxPay');
             //支付成功后续流程
-            payUtil::thirdPay($wxPay, $capitalType, $orderSn, $totalFee, $attach);
+            payUtil::thirdPay($wxPay, $capitalType, $orderSn, $totalFee, $attach, $transactionId);
             $transaction->commit();
 
             //播放收款声音

+ 5 - 5
app-pt/controllers/CashController.php

@@ -78,8 +78,8 @@ class CashController extends BaseController
                 util::fail('已审核过');
             }
 
-            $cashAccount = $shop->cashAccount ?? '';
-            $cashName = $shop->cashName ?? '';
+            $cashAccount = $main->cashAccount ?? '';
+            $cashName = $main->cashName ?? '';
             if (empty($cashAccount) || empty($cashName)) {
                 CashClass::rollback($cash, $shop, $transaction, $cashAmount, $remark);
                 util::fail('提现帐号未填写完整');
@@ -90,7 +90,7 @@ class CashController extends BaseController
                 util::fail('没有找到订单号');
             }
 
-            if (bccomp($cashAmount, $shop->freezeBalance) == 1) {
+            if (bccomp($cashAmount, $main->freezeBalance) == 1) {
                 CashClass::rollback($cash, $shop, $transaction, $cashAmount, $remark);
                 util::fail('冻结金额不足提现');
             }
@@ -158,8 +158,8 @@ class CashController extends BaseController
             $cash->cashAccount = $cashAccount;
             $cash->save();
             //扣掉冻结的金额
-            $shop->freezeBalance = bcsub($shop->freezeBalance, $cashAmount, 2);
-            $shop->save();
+            $main->freezeBalance = bcsub($main->freezeBalance, $cashAmount, 2);
+            $main->save();
 
             //发放代理佣金
             CashClass::sendBrokerage($shop, $cash);