From d64a364e912bb0d34c3efabd1bdee9a2f6ec0878 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期一, 24 三月 2025 14:06:24 +0800 Subject: [PATCH] fix:微信退款bug修复、新增获取渠道折扣接口 --- LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs index e057499..3d41c9c 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/AliPayNotifyController.cs @@ -51,12 +51,16 @@ //var serializeRequest = "{\"gmt_create\":\"2025-02-25 13:18:59\",\"charset\":\"UTF-8\",\"seller_email\":\"zfb1@818nb.com\",\"subject\":\"鐢熸椿缂磋垂-璇濊垂\",\"sign\":\"Sp06G1GxrAfDvoHPz9l3DJ20SxhvRzEGFeCGu4LHrSWmEG4OY7MHMx+iJi54ETbdXV0YsyDH9JZD7PWN3HCpEq/wGO4Wh4VSYSe7lqxD6r4f/HFiB0YlrdQoSzjZgYPzLjy6bcdlKRRHOeDkgs2i7TfvIsxWxHs9t0xuS0RlkpdZfb7d7m0EuZ/3v2Cbsj5AHjxb1S2PkO0oQyriYgGQdmkPqILZHwieST+tNEHS4dGFKYu2nkfctAGjWIDv/hKQNY7jEUxsEeG0SnK4TPU8zNplFR9/aKM0Wfwp1pdlaiP2u/d8vOtNh5q+emvaYbKrUkIEFBok8pDLNDta7ZjtVw==\",\"invoice_amount\":\"0.01\",\"buyer_open_id\":\"071xYXDfXBLAI9U11jg_WrH1K6hWq8HYGz0u85xBivf3Sce\",\"notify_id\":\"2025022501222131904087711494539601\",\"fund_bill_list\":\"[{\\\"amount\\\":\\\"0.01\\\",\\\"fundChannel\\\":\\\"ALIPAYACCOUNT\\\"}]\",\"notify_type\":\"trade_status_sync\",\"trade_status\":\"TRADE_SUCCESS\",\"receipt_amount\":\"0.01\",\"buyer_pay_amount\":\"0.01\",\"app_id\":\"2021004171602214\",\"sign_type\":\"RSA2\",\"seller_id\":\"2088050542042301\",\"gmt_payment\":\"2025-02-25 13:19:03\",\"notify_time\":\"2025-02-25 13:44:34\",\"merchant_app_id\":\"2021004171602214\",\"version\":\"1.0\",\"out_trade_no\":\"JF202502251318555214671\",\"total_amount\":\"0.01\",\"trade_no\":\"2025022522001487711401331043\",\"auth_app_id\":\"2021004171602214\",\"buyer_logon_id\":\"130****2238\",\"point_amount\":\"0.00\"}"; var input = JsonConvert.DeserializeObject<AliRechargeNotifyInput>(serializeRequest); - if (input.OutTradeNo.StartsWith("JF") && Regex.IsMatch(input.OutTradeNo, @"^JF\d+$")) + if (input.OutTradeNo.Contains("JF")) { if (input.TradeStatus == LifePaymentConstant.AliPayStatus.鏀粯鎴愬姛) { await _lifePayService.LifePaySuccessHandler(input.OutTradeNo, input.TradeNo); } + } + else + { + _logger.LogError($"鐢熸椿绠″鏀粯瀹濆厖鍊煎洖璋冮�氱煡锛氳鍗曞彿寮傚父 "+ input.OutTradeNo); } return new ContentResult @@ -72,7 +76,7 @@ [AllowAnonymous] public async Task<ContentResult> TestAliRechargeNotify(string outTradeNo, string tradeNo, bool success) { - if (outTradeNo.StartsWith("JF") && Regex.IsMatch(outTradeNo, @"^JF\d+$")) + if (outTradeNo.Contains("JF")) { if (success) { -- Gitblit v1.9.1