From 71ebcb10db1cdee7fa25f460b1c7ccb2eb41b852 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 11 Jun 2024 10:22:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=E5=92=8C?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=85=A5=E8=B4=A6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/PayNotifyLogic.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index acbcbfeb..9a73d754 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -29,8 +29,8 @@ class PayNotifyLogic extends BaseLogic public static function handle($action, $orderSn, $extra = []) { - Db::startTrans(); - try { + // Db::startTrans(); + // try { if ($action != 'cash_pay' && $action != 'balancePay') { $payNotifyLogLogic = new PayNotifyLogLogic(); if ($action == 'refund') { @@ -40,13 +40,13 @@ class PayNotifyLogic extends BaseLogic } } self::$action($orderSn, $extra); - Db::commit(); + // Db::commit(); return true; - } catch (\Exception $e) { - Db::rollback(); - Log::error('支付回调处理失败' . $e->getMessage() . ',lien:' . $e->getLine() . ',file:' . $e->getFile()); - throw new \Exception($e->getMessage()); - } + // } catch (\Exception $e) { + // Db::rollback(); + // Log::error('支付回调处理失败' . $e->getMessage() . ',lien:' . $e->getLine() . ',file:' . $e->getFile()); + // throw new \Exception($e->getMessage()); + // } } /** @@ -251,7 +251,7 @@ class PayNotifyLogic extends BaseLogic if ($order->pay_type != 9 || $order->pay_type != 10) { $financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::USER_ORDER_PAY); //用户单入账 //商户应该获得的钱 每个商品的price-ot_price 利润 - if ($order->profit !== "0.00") { + if (is_int($order->profit) &&$order->profit >0) { //手续费 $fees = bcdiv(bcmul($order['pay_price'], '0.02', 2), 1, 2); $financeLogic->in($transaction_id, $fees, OrderEnum::ORDER_COMMITION, $order['store_id']); //手续费入账