shish пре 8 месеци
родитељ
комит
c9a99b84ac
2 измењених фајлова са 7 додато и 7 уклоњено
  1. 5 5
      biz/renew/classes/RenewClass.php
  2. 2 2
      common/components/payUtil.php

+ 5 - 5
biz/renew/classes/RenewClass.php

@@ -20,7 +20,7 @@ class RenewClass extends BaseClass
         return $data;
     }
 
-    public static function thirdPay($payWay, $orderSn, $totalFee, $attach)
+    public static function thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId)
     {
         $renew = self::getByCondition(['orderSn' => $orderSn], true);
         if (empty($renew)) {
@@ -56,11 +56,8 @@ class RenewClass extends BaseClass
             $time = $beforeTime + 31536000;
             $newDate = date("Y-m-d H:i:s", $time);
 
-            $renew->payTime = date("Y-m-d H:i:s");
-            $renew->status = 1;
             $renew->deadline = $newDate;
             $renew->beforeDeadline = $before;
-            $renew->save();
 
             $shopList = ShopClass::getAllByCondition(['mainId' => $mainId], null, '*', null, true);
             if (!empty($shopList)) {
@@ -73,7 +70,10 @@ class RenewClass extends BaseClass
                 }
             }
         }
-
+        $renew->returnCode = $transactionId;
+        $renew->payTime = date("Y-m-d H:i:s");
+        $renew->status = 1;
+        $renew->save();
     }
 
 }

+ 2 - 2
common/components/payUtil.php

@@ -51,8 +51,8 @@ class payUtil
                 ScanPayClass::thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId);
                 break;
             case dict::getDict('capitalType', 'xhRenew', 'id'):
-                //商家续期
-                RenewClass::thirdPay($payWay, $orderSn, $totalFee, $attach);
+                //商家续期、购买套餐和设备
+                RenewClass::thirdPay($payWay, $orderSn, $totalFee, $attach, $transactionId);
                 break;
             case dict::getDict('capitalType', 'pxApply', 'id'):
                 //培训报名