From a18c570b07478002b6cbe8f86b1da28c37558677 Mon Sep 17 00:00:00 2001 From: JaneConan Date: Tue, 29 Oct 2024 11:03:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84=E4=BD=93=E9=AA=8C=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=8F=82=E6=95=B0path=EF=BC=8C=E6=8C=87?= =?UTF-8?q?=E5=AE=9A=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=89=AB=E7=A0=81=E5=90=8E?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=9B=E5=85=A5=E6=8C=87=E5=AE=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B9=B6=E5=8F=AF=E5=90=8C=E6=97=B6=E5=B8=A6=E4=B8=8A?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs index 2feb4ccda1..20ad701f55 100644 --- a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs +++ b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs @@ -97,12 +97,13 @@ public static CodeResultJson Commit(string accessToken, int template_id, string /// /// 获取小程序的体验二维码 /// - /// 从第三方平台获取到的该小程序授权 + /// 从第三方平台获取到的该小程序授权。第三方平台接口调用凭证authorizer_access_token,该参数为 URL 参数,非 Body 参数。(必填) + /// 指定二维码扫码后直接进入指定页面并可同时带上参数。(可选) /// [NcApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "CodeApi.GetQRCode", true, ApiRequestMethod = CO2NET.WebApi.ApiRequestMethod.Get)] - public static CodeResultJson GetQRCode(string accessToken, Stream stream, int timeOut = Config.TIME_OUT) + public static CodeResultJson GetQRCode(string accessToken, string path, Stream stream, int timeOut = Config.TIME_OUT) { - var url = string.Format(Config.ApiMpHost + "/wxa/get_qrcode?access_token={0}", accessToken.AsUrlData()); + var url = string.Format(Config.ApiMpHost + "/wxa/get_qrcode?access_token={0}&path={1}", accessToken.AsUrlData(), path.AsUrlData()); Get.Download(CommonDI.CommonSP, url, stream); return new CodeResultJson() From d9d66738f4d62158c9a8ed5b107e75ca9c9d72c7 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 29 Oct 2024 22:31:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=20Sample=20=E4=B8=AD=20AesGcmDecryptGetObj?= =?UTF-8?q?ectAsync=20=E6=96=B9=E6=B3=95=E7=BB=9F=E4=B8=80=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20DecryptGetObjectAsync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Weixin/TenPay/TenPayApiV3Controller.cs | 2 +- .../Controllers/TenPayApiV3Controller.cs | 4 ++-- .../Views/Shared/_Partial_03_PayCallback.cshtml | 2 +- .../Views/Shared/_Partial_05_Refund.cshtml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayApiV3Controller.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayApiV3Controller.cs index 03f603d067..f5706ebe8c 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayApiV3Controller.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayApiV3Controller.cs @@ -579,7 +579,7 @@ public async Task RefundNotifyUrl() try { var resHandler = new TenPayNotifyHandler(HttpContext); - var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync(); + var refundNotifyJson = await resHandler.DecryptGetObjectAsync(); WeixinTrace.SendCustomLog("跟踪RefundNotifyUrl信息", refundNotifyJson.ToJson()); diff --git a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs index 8b2f28a335..64e64a40d5 100644 --- a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs +++ b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs @@ -324,7 +324,7 @@ public async Task PayNotifyUrl() { //获取微信服务器异步发送的支付通知信息 var resHandler = new TenPayNotifyHandler(HttpContext); - var orderReturnJson = await resHandler.AesGcmDecryptGetObjectAsync(); + var orderReturnJson = await resHandler.DecryptGetObjectAsync(); //记录日志 Senparc.Weixin.WeixinTrace.SendCustomLog("PayNotifyUrl 接收到消息", orderReturnJson.ToJson(true)); @@ -552,7 +552,7 @@ public async Task RefundNotifyUrl() try { var resHandler = new TenPayNotifyHandler(HttpContext); - var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync(); + var refundNotifyJson = await resHandler.DecryptGetObjectAsync(); WeixinTrace.SendCustomLog("跟踪RefundNotifyUrl信息", refundNotifyJson.ToJson()); diff --git a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_03_PayCallback.cshtml b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_03_PayCallback.cshtml index 4a195035bc..66cbd5ad90 100644 --- a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_03_PayCallback.cshtml +++ b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_03_PayCallback.cshtml @@ -22,7 +22,7 @@ public async Task<IActionResult> PayNotifyUrl() { //获取微信服务器异步发送的支付通知信息 var resHandler = new TenPayNotifyHandler(HttpContext); - var orderReturnJson = await resHandler.AesGcmDecryptGetObjectAsync<OrderReturnJson>(); + var orderReturnJson = await resHandler.DecryptGetObjectAsync<OrderReturnJson>(); //获取支付状态 string trade_state = orderReturnJson.trade_state; diff --git a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_05_Refund.cshtml b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_05_Refund.cshtml index eea9f7ad37..6738f4392a 100644 --- a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_05_Refund.cshtml +++ b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Views/Shared/_Partial_05_Refund.cshtml @@ -65,7 +65,7 @@ public async Task<IActionResult> RefundNotifyUrl() try { var resHandler = new TenPayNotifyHandler(HttpContext); - var refundNotifyJson = await resHandler.AesGcmDecryptGetObjectAsync<RefundNotifyJson>(); + var refundNotifyJson = await resHandler.DecryptGetObjectAsync<RefundNotifyJson>(); WeixinTrace.SendCustomLog("跟踪RefundNotifyUrl信息", refundNotifyJson.ToJson()); From 096816edad214f3e67798b795d16159b49bfd0a6 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Sun, 3 Nov 2024 00:11:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?Open=20[2024-11-03]=20v4.20.6=20fix=20wxa?= =?UTF-8?q?=20ap=20is=20get=20qr=20code=20async=20Issue=20#3089,=20PR=20#3?= =?UTF-8?q?090=20=E6=84=9F=E8=B0=A2=20@JaneConan=20@chenjian8541?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Senparc.Weixin.Open/Senparc.Weixin.Open.net8.csproj | 5 +++-- .../Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/Senparc.Weixin.Open.net8.csproj b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/Senparc.Weixin.Open.net8.csproj index d0dea695b9..e1068e1102 100644 --- a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/Senparc.Weixin.Open.net8.csproj +++ b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/Senparc.Weixin.Open.net8.csproj @@ -1,7 +1,7 @@ net462;netstandard2.0;netstandard2.1 - 4.20.5 + 4.20.6 Senparc.Weixin.Open Senparc.Weixin.Open true @@ -226,7 +226,8 @@ [2024-08-06] v4.18.4 更新基础库,包括 Senparc.CO2NET 相关库、Senparc.AI [2024-08-11] v4.20.0.0 1、添加查询小程序是否已完成交易结算管理确认 2、添加第三方小程序订单页设置结果及审核结果事件通知 #3055 感谢 @mc7246 [2024-09-10] v4.20.2 icp verifytask 接口 data 不能为 null 的问题处理 #3067 感谢 @mojinxun - + [2024-11-03] v4.20.6 fix wxa ap is get qr code async Issue #3089, PR #3090 感谢 @JaneConan + https://github.com/JeffreySu/WeiXinMPSDK diff --git a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs index 20ad701f55..c2e99a1f58 100644 --- a/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs +++ b/src/Senparc.Weixin.Open/Senparc.Weixin.Open/WxaAPIs/Code/CodeApi.cs @@ -45,6 +45,9 @@ and limitations under the License. 修改标识:mc7246 - 20210930 修改描述:v4.11.500 添加第三方代码提审资料上传接口 + 修改标识:JaneConan - 20241103 + 修改描述:v4.20.6 fix wxa ap is get qr code async Issue #3089, PR #3090 + ----------------------------------------------------------------*/