소스 검색

金额计算

shish 6 년 전
부모
커밋
fad3395ea9
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      app/mall/controllers/OrderController.php
  2. 1 1
      common/services/xhPayToolService.php

+ 1 - 1
app/mall/controllers/OrderController.php

@@ -158,7 +158,7 @@ class OrderController extends BaseController
         OrderService::check($order, $this->userId);
         $typeList = configDict::getConfig('capitalType');
         $capitalType = $typeList['xhOrder']['id'];
-        $totalFee = $order['actPrice'];
+        $totalFee = $order['prePrice'];
         $sourceType = 0;
         $discountData = OrderService::getDiscountPrice(['price' => $totalFee, 'sourceType' => $sourceType, 'couponId' => $couponId, 'userId' => $this->userId]);
         $actPrice = $discountData['price'];

+ 1 - 1
common/services/xhPayToolService.php

@@ -92,7 +92,7 @@ class xhPayToolService
 			}
 			if ($totalFee != $order['actPrice']) {
 				Yii::warning('第三方回调金额与订单表里金额不一致,capitalType:' . $capitalType . ' orderSn:' . $orderSn);
-				util::fail('订单出错了');
+				util::fail('订单出错了(第三方回调金额与订单金额不一致)');
 			}
 			$orderId = $order['id'];
 			$orderSn = $order['orderSn'];