From 59b5ed67affc1db6bef8a88752d57c332c38cfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=A4=A7=E6=9D=BE?= <16541@DESKTOP-79N13FG> Date: Fri, 4 Aug 2023 15:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=A1=8C=E6=94=AF=E4=BB=98=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=A0=81=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.props | 2 +- src/Magicodes.Pay.Icbcpay/IcbcpayAppService.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common.props b/common.props index 6b416b0..c14a4e0 100644 --- a/common.props +++ b/common.props @@ -1,6 +1,6 @@ - 1.6.6 + 1.6.7 雪雁 diff --git a/src/Magicodes.Pay.Icbcpay/IcbcpayAppService.cs b/src/Magicodes.Pay.Icbcpay/IcbcpayAppService.cs index 79b9c49..69bddc4 100644 --- a/src/Magicodes.Pay.Icbcpay/IcbcpayAppService.cs +++ b/src/Magicodes.Pay.Icbcpay/IcbcpayAppService.cs @@ -124,7 +124,10 @@ public IcbcpayOutput PayNotifyHandler(Dictionary dic) msg_id = respMap["msg_id"] }; - var bizResultJson = JsonConvert.SerializeObject(bizResult); + if(bizResult.return_code != "0") + throw new Exception($"工行支付失败"); + + var bizResultJson = JsonConvert.SerializeObject(bizResult); var signDic = $"\"response_biz_content\":{bizResultJson },\"sign_type\":\"{signType}\""; sign = IcbcSignature.sign(signStr, signType, IcbcSettings.MY_PRIVATE_KEY, charset);