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()); 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 2feb4ccda1..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 + ----------------------------------------------------------------*/ @@ -97,12 +100,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()