修改微信实际支付金额

This commit is contained in:
lewis 2025-01-18 14:35:07 +08:00
parent 69870c6dd6
commit 92de8b8ead

View File

@ -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();
}