From 92de8b8eadbf214c777547513e736d5332ba05a2 Mon Sep 17 00:00:00 2001 From: lewis <604446095@qq.com> Date: Sat, 18 Jan 2025 14:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BE=AE=E4=BF=A1=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E6=94=AF=E4=BB=98=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 944f38fc8..a576278eb 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -253,7 +253,13 @@ class PayNotifyLogic extends BaseLogic UserProductStorageLogic::add($order); } if ($order->pay_type != 10) { - $order->pay_price = bcdiv($extra['amount']['payer_total'], 100, 2); + $payerTotal = $extra['amount']['payer_total']; + if (!empty($extra['promotion_detail'])) { + foreach ($extra['promotion_detail'] as $v) { + $payerTotal += $v['amount']; + } + } + $order->pay_price = bcdiv($payerTotal, 100, 2); } else { $extra['transaction_id'] = time(); }