From ff53552f49decceb2c3a7c59dde3b92c5b658558 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Tue, 11 Jun 2024 09:31:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=8D=95=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=8B=86=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/PayController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index fa468d88..bcff5cf6 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -5,6 +5,7 @@ namespace app\api\controller; use app\common\enum\PayEnum; use app\common\logic\PayNotifyLogic; use app\common\model\retail\Cashierclass; +use app\common\model\store_order\StoreOrder; use app\common\service\pay\PayService; use support\Cache; use support\Log; @@ -49,6 +50,11 @@ class PayController extends BaseApiController $ciphertext = $result->resource['ciphertext']; if ($ciphertext['refund_status'] === 'SUCCESS') { //处理订单 -1判断是退的一单还是拆分的订单 + $out_trade_no = $ciphertext['out_trade_no'].'-1'; + $check = StoreOrder::where('order_id',$out_trade_no)->count(); + if($check){ + $ciphertext['out_trade_no'] =$out_trade_no; + } PayNotifyLogic::handle('refund', $ciphertext['out_trade_no'], $ciphertext); $app->wechat->success();