|
|
@@ -397,13 +397,18 @@ class NoticeController extends PublicController
|
|
|
|
|
|
$postData = json_decode($postStr, true);
|
|
|
$orderSn = $postData['out_order_no'] ?? '';
|
|
|
- $payer_amount = $postData['total_amount'] ?? 0;
|
|
|
- $payMode = $postData['pay_mode'] ?? '';
|
|
|
+ $orderTradeInfo = $postData['order_trade_info'] ?? [];
|
|
|
+ $payMode = $orderTradeInfo['pay_mode'] ?? null;
|
|
|
if (empty($payMode)) {
|
|
|
noticeUtil::push('收银台支付回调失败了,没有找到钱包类型,请注意,orderSn:' . $orderSn, '15280215347');
|
|
|
util::end();
|
|
|
}
|
|
|
+ $payer_amount = $orderTradeInfo['payer_amount'] ?? 0;
|
|
|
$totalFee = $payer_amount / 100;
|
|
|
+ if ($totalFee <= 0) {
|
|
|
+ noticeUtil::push('收银台支付回调验证失败了,金额错误,请注意,orderSn:' . $orderSn, '15280215347');
|
|
|
+ util::end();
|
|
|
+ }
|
|
|
$transactionId = $postData['pay_order_no'] ?? 0;
|
|
|
|
|
|
if ($return == false) {
|
|
|
@@ -419,13 +424,7 @@ class NoticeController extends PublicController
|
|
|
util::end();
|
|
|
}
|
|
|
|
|
|
- $capitalType = isset($capitalType) ? $capitalType : null;
|
|
|
-
|
|
|
-
|
|
|
- if (isset($capitalType) == false) {
|
|
|
- Yii::warning('capitalType empty, orderSn:' . $orderSn);
|
|
|
- util::end();
|
|
|
- }
|
|
|
+ $capitalType = dict::getDict('capitalType', 'xhOrder', 'id');
|
|
|
|
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|