diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs index 7587067e93..e8413d1941 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/LocationService.cs @@ -7,7 +7,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System.Collections.Generic; using Senparc.Weixin.MP.Entities; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync.cs index 86b96a8275..edc4cda693 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20191003 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System.Threading; using System.Threading.Tasks; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs index 05131753ca..b2fc8b97ec 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/Async/CustomMessageHandlerAsync_Events.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.CO2NET.Extensions; using Senparc.NeuChar.Entities; using Senparc.Weixin.Exceptions; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs index 081b0f0cc9..cd806c2e5d 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs index 0c11e326b5..9262291ea2 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler.cs @@ -15,7 +15,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.CO2NET.Helpers; using Senparc.CO2NET.Utilities; using Senparc.NeuChar.Agents; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs index 3b6af7b967..d992467f1f 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/CustomMessageHandler/CustomMessageHandler_Events.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.CO2NET; using Senparc.CO2NET.Extensions; using Senparc.CO2NET.Utilities; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs index ad5e30688b..e49b913e9f 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WebSocket/CustomNetCoreWebSocketMessageHandler.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE WebSocket -#if !NET462 +#if !NET462 using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageContext.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageContext.cs index 3e8d15127b..2f19cd940a 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageContext.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE Work using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs index 5aed4c386d..34b6cb55d2 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WorkMessageHandler/WorkCustomMessageHandler.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE Work using System; using System.Collections.Generic; using System.IO; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs index 14228721e1..75cf40ea29 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MiniProgram using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs index 8a625f4ae7..d9bf6e160f 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/MessageHandlers/WxOpenMessageHandler/CustomWxOpenMessageHandler.cs @@ -12,7 +12,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MiniProgram using Senparc.CO2NET.Utilities; using Senparc.NeuChar.Entities; using Senparc.Weixin.WxOpen.Entities; diff --git a/Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs b/Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs index b8f3c0e42a..38025d6de6 100644 --- a/Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs +++ b/Samples/All/Senparc.Weixin.Sample.CommonService/TemplateMessageService.cs @@ -1,4 +1,3 @@ -//DPBMARK_FILE MiniProgram using Senparc.CO2NET.Cache; using Senparc.Weixin.Sample.CommonService.TemplateMessage.WxOpen; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/CacheController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/CacheController.cs index bb9a476856..feb95e31d2 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/CacheController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/CacheController.cs @@ -1,6 +1,4 @@ -//DPBMARK_FILE Redis -//DPBMARK_FILE Memcached -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Cache; using Senparc.Weixin.Cache; using Senparc.Weixin.Containers; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/SimulateToolController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/SimulateToolController.cs index 8abb09f248..862af92eaa 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/SimulateToolController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Tools/SimulateToolController.cs @@ -12,7 +12,6 @@ 修改描述:优化消息模拟功能 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.IO; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AnalysisController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AnalysisController.cs index df2a9ccdff..5e6c33771b 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AnalysisController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AnalysisController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Senparc.Weixin.MP.AdvancedAPIs; using Senparc.Weixin.MP.AdvancedAPIs.Analysis; using Senparc.Weixin.MP.Containers; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AsyncMethodsController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AsyncMethodsController.cs index 7bdbf859b3..81e4276944 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AsyncMethodsController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/AsyncMethodsController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Cache; using Senparc.CO2NET.Extensions; using Senparc.CO2NET.HttpUtility; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/DeviceController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/DeviceController.cs index 025321c615..f2a2e05ab0 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/DeviceController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/DeviceController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using Senparc.Weixin.MP.Helpers; +using Senparc.Weixin.MP.Helpers; using System; using System.Collections.Generic; using System.Configuration; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MediaController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MediaController.cs index 895cf44af5..dce0b55f45 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MediaController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MediaController.cs @@ -10,7 +10,6 @@ 修改标识:Senparc - 20150312 修改描述:TestUploadMediaFile() 方法专为Senparc.Weixin.MP.Test/HttpUtility/RequestUtilityTest.cs/HttpPostTest 提供上传测试目标 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MenuController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MenuController.cs index 733f644245..aa66b0ea7f 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MenuController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/MenuController.cs @@ -7,7 +7,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/OAuth2Controller.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/OAuth2Controller.cs index e772cc9aa7..deba05a0b9 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/OAuth2Controller.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/OAuth2Controller.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.Configuration; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/SubscribeMsgController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/SubscribeMsgController.cs index 2ec71ceadd..5eb1113dfa 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/SubscribeMsgController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/SubscribeMsgController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Web; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WebSocketController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WebSocketController.cs index 8ab65586b1..89e65ebc71 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WebSocketController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WebSocketController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinAsyncController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinAsyncController.cs index a266a4a2dd..edaae2a6e6 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinAsyncController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinAsyncController.cs @@ -23,7 +23,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MP //using System; //using System.Collections.Generic; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController.cs index 5b329b2e34..b7bdb63e6b 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController.cs @@ -21,7 +21,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, */ -//DPBMARK_FILE MP using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController_OldPost.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController_OldPost.cs index e1af3c747b..c076343832 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController_OldPost.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinController_OldPost.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.IO; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinJSSDKController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinJSSDKController.cs index 9fa3d55cb9..41750b1349 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinJSSDKController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/MP/WeixinJSSDKController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using Senparc.Weixin.MP.CommonAPIs; +using Senparc.Weixin.MP.CommonAPIs; using Senparc.Weixin.MP.Helpers; using System; using System.Collections.Generic; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenController.cs index e505a16e02..2ee1d87cb1 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE Open -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenOAuthController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenOAuthController.cs index 1c84db7aee..37e6da6e50 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenOAuthController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Open/OpenOAuthController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE Open -using System; +using System; using System.Collections.Generic; using System.Configuration; using System.Linq; 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 98d2eff4e3..03f603d067 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 @@ -14,7 +14,6 @@ /* 注意:TenPayApiV3Controller 为真正微信支付 API V3 的示例 */ -//DPBMARK_FILE TenPay using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Extensions; @@ -37,14 +36,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; - - using Senparc.Weixin.MP; using Senparc.Weixin.Sample.Net8.Filters; using Senparc.Weixin.MP.AdvancedAPIs; using Senparc.Weixin.Sample.CommonService.TemplateMessage; using Senparc.Weixin.Sample.CommonService.Utilities; using Senparc.CO2NET.HttpUtility; +using Senparc.CO2NET.Trace; //DPBMARK_END namespace Senparc.Weixin.Sample.Net8.Controllers @@ -219,7 +217,7 @@ public IActionResult ProductPayCode(int productId, int hc) #endregion - + #region OAuth授权 public ActionResult OAuthCallback(string code, string state, string returnUrl) { @@ -296,7 +294,6 @@ public async Task JsApi(int productId, int hc) var price = product == null ? 100 : (int)(product.Price * 100);//单位:分 var notifyUrl = TenPayV3Info.TenPayV3Notify.Replace("/TenpayV3/", "/TenPayApiV3/").Replace("http://", "https://"); - //请求信息 TransactionsRequestData jsApiRequestData = new(TenPayV3Info.AppId, TenPayV3Info.MchId, name + " - 微信支付 V3", sp_billno, new TenpayDateTime(DateTime.Now.AddHours(1), false), null, notifyUrl, null, new() { currency = "CNY", total = price }, new(openId), null, null, null); @@ -307,6 +304,7 @@ public async Task JsApi(int productId, int hc) if (result.VerifySignSuccess != true) { + SenparcTrace.SendCustomLog("basePayApis2.JsApiAsync 接口出错", $" JsApiReturnJson 返回结果:{result.ToJson(true)}"); throw new WeixinException("获取 prepay_id 结果校验出错!"); } diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayController.cs index 772d439ca4..1c151de5bd 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayController.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE TenPay using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayV3Controller.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayV3Controller.cs index 612c893d85..f4577d7b5a 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayV3Controller.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/TenPay/TenPayV3Controller.cs @@ -21,7 +21,6 @@ * 微信真正微信支付 API V3 的示例请见 TenPayApiV3Controller */ -//DPBMARK_FILE TenPay using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Extensions; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/ThirdPartyAuth/ThirdPartyAuthController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/ThirdPartyAuth/ThirdPartyAuthController.cs index 9b66549ae6..e6c8441f29 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/ThirdPartyAuth/ThirdPartyAuthController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/ThirdPartyAuth/ThirdPartyAuthController.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE Open -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Work/WorkController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Work/WorkController.cs index 164f32be2b..33bc4054e9 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Work/WorkController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/Work/WorkController.cs @@ -22,7 +22,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, */ -//DPBMARK_FILE Work using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.AspNet.HttpUtility; using Senparc.CO2NET.Utilities; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/WxOpen/WxOpenController.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/WxOpen/WxOpenController.cs index e1279c03e4..c105716231 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/WxOpen/WxOpenController.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Controllers/Weixin/WxOpen/WxOpenController.cs @@ -12,7 +12,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, */ -//DPBMARK_FILE MiniProgram using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Cache; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs index 7bb86b51a7..e6e70565d7 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Filters/CustomOAuthAttribute.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP - + using Microsoft.AspNetCore.Http; using Senparc.Weixin.MP.MvcExtension; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs index b8ac72a4a9..6225636e7b 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/ProductModel.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE TenPay -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs index ef08792fa1..e6ebe93e01 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Models/VD/AnalysisVD.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE MP -using System; +using System; using System.Collections.Generic; using System.Linq; using Senparc.Weixin.MP.Entities; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Analysis/Index.cshtml b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Analysis/Index.cshtml index 6e479c5070..68d5117c65 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Analysis/Index.cshtml +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Analysis/Index.cshtml @@ -1,6 +1,5 @@ @model Senparc.Weixin.Sample.Net8.Models.VD.Analysis_IndexVD -@*//DPBMARK_FILE MP*@ - +@* @{ ViewBag.Title = "微信分析数据接口测试工具"; Layout = "~/Views/Shared/_Layout.cshtml"; diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Cache/Test.cshtml b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Cache/Test.cshtml index 3166dcb29a..fe5ffe55d3 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Cache/Test.cshtml +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Cache/Test.cshtml @@ -2,8 +2,6 @@ ViewBag.Title = "微信分布式缓存策略测试"; Layout = "~/Views/Shared/_Layout.cshtml"; -//DPBMARK_FILE Redis -//DPBMARK_FILE Memcached } @section HeaderContent { diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/WebSocket/Hubs/SenparcHub.cs b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/WebSocket/Hubs/SenparcHub.cs index 75211bd4ab..d43fc82561 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/WebSocket/Hubs/SenparcHub.cs +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/WebSocket/Hubs/SenparcHub.cs @@ -1,5 +1,4 @@ -//DPBMARK_FILE WebSocket - + using Microsoft.AspNetCore.SignalR; using Senparc.WebSocket.SignalR; using System.Threading.Tasks; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP.Simple/MessageHandlers/CustomMessageHandler.cs b/Samples/MP/Senparc.Weixin.Sample.MP.Simple/MessageHandlers/CustomMessageHandler.cs index 8f04a59889..0aa4894583 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP.Simple/MessageHandlers/CustomMessageHandler.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP.Simple/MessageHandlers/CustomMessageHandler.cs @@ -15,7 +15,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.NeuChar.Entities; using Senparc.Weixin.MP.Entities; using Senparc.Weixin.MP.Entities.Request; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP.Simple/Views/Home/Index.cshtml b/Samples/MP/Senparc.Weixin.Sample.MP.Simple/Views/Home/Index.cshtml index 1be4471faa..574d1d243c 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP.Simple/Views/Home/Index.cshtml +++ b/Samples/MP/Senparc.Weixin.Sample.MP.Simple/Views/Home/Index.cshtml @@ -79,9 +79,9 @@

您可以在当前解决方案中,Libraries 目录下,将所需要引用的程序集引用(复制)到您开发环境的解决方案中,请注意需要同时引用被依赖的项目,如 Senparc.Weixin 项目是所有项目都需要依赖的。

当前示例项目默认就使用了直接引用源码的方式,可从 .csproj 文件中看到引用方式:

<ItemGroup>
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.Middleware\Senparc.Weixin.MP.Middleware.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net6.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.Middleware\Senparc.Weixin.MP.Middleware.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net8.csproj" />
 </ItemGroup>
引用程序集(推荐)
diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/OAuth2Controller.cs b/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/OAuth2Controller.cs index 88ce35011a..1de1c9860d 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/OAuth2Controller.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/OAuth2Controller.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Extensions; using Senparc.Weixin.Exceptions; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/WeixinController.cs b/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/WeixinController.cs index f05896eb43..4d31b02d72 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/WeixinController.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/Controllers/WeixinController.cs @@ -23,7 +23,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, 3. 更多使用演示请参考 Senparc.Weixin.Sample.All 同名文件。 */ -//DPBMARK_FILE MP using Microsoft.AspNetCore.Mvc; namespace Senparc.Weixin.Sample.MP.Controllers diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageContext.cs b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageContext.cs index 92e23f2107..cc37d1344e 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageContext.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs index 037311af93..a21b365636 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler.cs @@ -15,7 +15,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.CO2NET.Helpers; using Senparc.CO2NET.Utilities; using Senparc.NeuChar.Entities; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler_Events.cs b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler_Events.cs index 8237f4f7d0..ac9996591b 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler_Events.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/MessageHandlers/CustomMessageHandler_Events.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using Senparc.CO2NET.Extensions; using Senparc.CO2NET.Utilities; using Senparc.NeuChar.Agents; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs b/Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs index a6d4efd321..b469c731ac 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs +++ b/Samples/MP/Senparc.Weixin.Sample.MP/Services/LocationService.cs @@ -7,7 +7,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MP using System.Collections.Generic; using Senparc.Weixin.MP.Entities; diff --git a/Samples/MP/Senparc.Weixin.Sample.MP/Views/Home/Index.cshtml b/Samples/MP/Senparc.Weixin.Sample.MP/Views/Home/Index.cshtml index 1be4471faa..574d1d243c 100644 --- a/Samples/MP/Senparc.Weixin.Sample.MP/Views/Home/Index.cshtml +++ b/Samples/MP/Senparc.Weixin.Sample.MP/Views/Home/Index.cshtml @@ -79,9 +79,9 @@

您可以在当前解决方案中,Libraries 目录下,将所需要引用的程序集引用(复制)到您开发环境的解决方案中,请注意需要同时引用被依赖的项目,如 Senparc.Weixin 项目是所有项目都需要依赖的。

当前示例项目默认就使用了直接引用源码的方式,可从 .csproj 文件中看到引用方式:

<ItemGroup>
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.Middleware\Senparc.Weixin.MP.Middleware.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net6.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.Middleware\Senparc.Weixin.MP.Middleware.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension\Senparc.Weixin.MP.MvcExtension.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.MP\Senparc.Weixin.MP\Senparc.Weixin.MP.net8.csproj" />
 </ItemGroup>
引用程序集(推荐)
diff --git a/Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Controllers/TenPayV3Controller.cs b/Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Controllers/TenPayV3Controller.cs index 77cbd48676..5498ed15d6 100644 --- a/Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Controllers/TenPayV3Controller.cs +++ b/Samples/TenPayV2/Senparc.Weixin.Sample.TenPayV2/Controllers/TenPayV3Controller.cs @@ -21,7 +21,6 @@ * 微信真正微信支付 API V3 的示例请见 TenPayApiV3Controller */ -//DPBMARK_FILE TenPay using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Extensions; diff --git a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs index 332e08d475..8b2f28a335 100644 --- a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs +++ b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs @@ -14,7 +14,6 @@ /* 注意:TenpayApiV3Controller 为真正微信支付 API V3 的示例 */ -//DPBMARK_FILE TenPay using System.Collections.Concurrent; using System.Text; using Microsoft.AspNetCore.Mvc; diff --git a/Samples/Work/Senparc.Weixin.Sample.Work/Controllers/WorkController.cs b/Samples/Work/Senparc.Weixin.Sample.Work/Controllers/WorkController.cs index 9408cc24c0..456802ec3e 100644 --- a/Samples/Work/Senparc.Weixin.Sample.Work/Controllers/WorkController.cs +++ b/Samples/Work/Senparc.Weixin.Sample.Work/Controllers/WorkController.cs @@ -22,7 +22,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, */ -//DPBMARK_FILE Work using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.AspNet.HttpUtility; using Senparc.CO2NET.Utilities; diff --git a/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageContext.cs b/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageContext.cs index 17216b467b..9b9ddd5e73 100644 --- a/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageContext.cs +++ b/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE Work using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs b/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs index e60e416c33..75b8968f03 100644 --- a/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs +++ b/Samples/Work/Senparc.Weixin.Sample.Work/MessageHandlers/WorkCustomMessageHandler.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE Work using System; using System.Collections.Generic; using System.IO; diff --git a/Samples/Work/Senparc.Weixin.Sample.Work/Views/Home/Index.cshtml b/Samples/Work/Senparc.Weixin.Sample.Work/Views/Home/Index.cshtml index 9e231fd014..b59ef8e143 100644 --- a/Samples/Work/Senparc.Weixin.Sample.Work/Views/Home/Index.cshtml +++ b/Samples/Work/Senparc.Weixin.Sample.Work/Views/Home/Index.cshtml @@ -80,9 +80,9 @@

您可以在当前解决方案中,Libraries 目录下,将所需要引用的程序集引用(复制)到您开发环境的解决方案中,请注意需要同时引用被依赖的项目,如 Senparc.Weixin 项目是所有项目都需要依赖的。

当前示例项目默认就使用了直接引用源码的方式,可从 .csproj 文件中看到引用方式:

<ItemGroup>
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.AspNet\Senparc.Weixin.AspNet.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.Work.Middleware\Senparc.Weixin.Work.Middleware.net6.csproj" />
-    <ProjectReference Include="..\..\..\src\Senparc.Weixin.Work\Senparc.Weixin.Work\Senparc.Weixin.Work.net6.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.AspNet\Senparc.Weixin.AspNet.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.Work.Middleware\Senparc.Weixin.Work.Middleware.net8.csproj" />
+    <ProjectReference Include="..\..\..\src\Senparc.Weixin.Work\Senparc.Weixin.Work\Senparc.Weixin.Work.net8.csproj" />
 </ItemGroup>
引用程序集(推荐)
diff --git a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Controllers/WxOpenController.cs b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Controllers/WxOpenController.cs index cb640f7244..7640ea0c60 100644 --- a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Controllers/WxOpenController.cs +++ b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Controllers/WxOpenController.cs @@ -12,7 +12,6 @@ 2. 目前 Senparc.Weixin SDK 已经全面转向异步方法驱动, */ -//DPBMARK_FILE MiniProgram using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.AspNet.HttpUtility; using Senparc.CO2NET.Cache; diff --git a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageContext.cs b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageContext.cs index f649a6bbe3..c98022c8ba 100644 --- a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageContext.cs +++ b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageContext.cs @@ -8,7 +8,6 @@ 创建标识:Senparc - 20150312 ----------------------------------------------------------------*/ -//DPBMARK_FILE MiniProgram using System; using System.Collections.Generic; using System.Linq; diff --git a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs index 9f9a6e4c81..667c96d0a3 100644 --- a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs +++ b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/MessageHandlers/CustomWxOpenMessageHandler.cs @@ -12,7 +12,6 @@ ----------------------------------------------------------------*/ -//DPBMARK_FILE MiniProgram using Senparc.CO2NET.Utilities; using Senparc.NeuChar.Entities; using Senparc.Weixin.WxOpen.Entities; diff --git a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Views/Home/Index.cshtml b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Views/Home/Index.cshtml index 913f6d5591..6de7fc1c14 100644 --- a/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Views/Home/Index.cshtml +++ b/Samples/WxOpen/Senparc.Weixin.Sample.WxOpen/Views/Home/Index.cshtml @@ -80,9 +80,9 @@
引用源码

您可以打开 ../All/net6-mvc/ 前解决方案(全量进阶示例),在 Libraries 目录下,将所需要引用的程序集引用(复制)到您开发环境的解决方案中,请注意需要同时引用被依赖的项目,如 Senparc.Weixin 项目是所有项目都需要依赖的。

当前示例项目默认就使用了直接引用源码的方式,可从 .csproj 文件中看到引用方式:

-
<ProjectReference Include="..\..\..\src\Senparc.Weixin.AspNet\Senparc.Weixin.AspNet.net6.csproj" />
-		<ProjectReference Include="..\..\..\src\Senparc.Weixin.WxOpen.Middleware\Senparc.Weixin.WxOpen.Middleware.net6.csproj" />
-		<ProjectReference Include="..\..\..\src\Senparc.Weixin.WxOpen\src\Senparc.Weixin.WxOpen\Senparc.Weixin.WxOpen\Senparc.Weixin.WxOpen.net6.csproj" />
+
<ProjectReference Include="..\..\..\src\Senparc.Weixin.AspNet\Senparc.Weixin.AspNet.net8.csproj" />
+		<ProjectReference Include="..\..\..\src\Senparc.Weixin.WxOpen.Middleware\Senparc.Weixin.WxOpen.Middleware.net8.csproj" />
+		<ProjectReference Include="..\..\..\src\Senparc.Weixin.WxOpen\src\Senparc.Weixin.WxOpen\Senparc.Weixin.WxOpen\Senparc.Weixin.WxOpen.net8.csproj" />
引用程序集(推荐)
diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/TenPayHttpClient/Signer/SM3WithSM2SignerTests.cs b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/TenPayHttpClient/Signer/SM3WithSM2SignerTests.cs index bc205b78b7..b5e72ad445 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/TenPayHttpClient/Signer/SM3WithSM2SignerTests.cs +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3.Test/TenPayHttpClient/Signer/SM3WithSM2SignerTests.cs @@ -15,7 +15,7 @@ public class SM3WithSM2SignerTests public void SignTest() { SM3WithSM2Signer sM3WithSM2Signer = new(); - var message = ""; + var message = "Senparc"; var privateKey = ""; var sign = sM3WithSM2Signer.Sign(message, privateKey); var exceptResult = "1ab21d8355cfa17f8e61194831e81a8f22bec8c728fefb747ed035eb5082aa2b"; diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj index 8cf0550ed5..d187dfd424 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/Senparc.Weixin.TenPayV3.net8.csproj @@ -1,7 +1,7 @@ netstandard2.1 - 1.6.2 + 1.6.3 Senparc.Weixin.TenPayV3 Senparc.Weixin.TenPayV3 10.0 @@ -56,6 +56,7 @@ v1.2.1.1 解决微信支付分、完成订单参数可为空的问题 Issue #2989 v1.4.0 添加:微信支付-发起商家转账入参添加转账场景ID、通知地址;返回结果添加批次状态 / PR #3030 v1.4.2 完善 SM 相关方法 + v1.6.3 更新支付接口调用过程中的 SM 和 RSA 判断方式 https://github.com/JeffreySu/WeiXinMPSDK diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs index 6b585bfd03..9b868d363e 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPayHttpClient.cs @@ -60,17 +60,17 @@ public class BasePayApis2 { private readonly SenparcHttpClient _httpClient; private ISenparcWeixinSettingForTenpayV3 _tenpayV3Setting; - private readonly CertType _certType; + //private CertType CertType => _tenpayV3Setting.EncryptionType == "SM" ? CertType.SM : CertType.RSA; /// /// 构造函数 /// /// - public BasePayApis2(SenparcHttpClient httpClient, ISenparcWeixinSettingForTenpayV3 senparcWeixinSettingForTenpayV3 = null, CertType certType = CertType.RSA) + public BasePayApis2(SenparcHttpClient httpClient, ISenparcWeixinSettingForTenpayV3 senparcWeixinSettingForTenpayV3 = null/*, CertType certType = CertType.RSA*/) { this._httpClient = httpClient; _tenpayV3Setting = senparcWeixinSettingForTenpayV3 ?? Senparc.Weixin.Config.SenparcWeixinSetting.TenpayV3Setting; - this._certType = certType; + //this._certType = certType; } /// @@ -95,8 +95,8 @@ public async Task JsApiAsync(TransactionsRequestData data, int { var url = ReturnPayApiUrl(Senparc.Weixin.Config.TenPayV3Host + "/{0}v3/pay/transactions/jsapi"); - HttpClient hc = null;//注入 - TenPayHttpClient tenPayApiRequest = new(_httpClient, _tenpayV3Setting, _tenpayV3Setting.EncryptionType == CertType.SM.ToString() ? CertType.SM : CertType.RSA); + //HttpClient hc = null;//注入 + TenPayHttpClient tenPayApiRequest = new(_httpClient, _tenpayV3Setting); return await tenPayApiRequest.SendAsync(url, data, timeOut); } } @@ -108,16 +108,17 @@ public class TenPayHttpClient private readonly HttpClient _client; private readonly ISigner _signer; private readonly IVerifier _verifier; + private CertType CertType => _tenpayV3Setting.EncryptionType == "SM" ? CertType.SM : CertType.RSA; - public TenPayHttpClient(SenparcHttpClient httpClient, ISenparcWeixinSettingForTenpayV3 senparcWeixinSettingForTenpayV3 = null, CertType certType = CertType.RSA) + public TenPayHttpClient(SenparcHttpClient httpClient, ISenparcWeixinSettingForTenpayV3 senparcWeixinSettingForTenpayV3 = null) { this._httpClient = httpClient; this._client = this._httpClient.Client; _tenpayV3Setting = senparcWeixinSettingForTenpayV3 ?? Senparc.Weixin.Config.SenparcWeixinSetting.TenpayV3Setting; //从工厂获得签名和验签的方法类 - _signer = TenPayCertFactory.GetSigner(certType); - _verifier = TenPayCertFactory.GetVerifier(certType); + _signer = TenPayCertFactory.GetSigner(CertType); + _verifier = TenPayCertFactory.GetVerifier(CertType); #region 配置UA diff --git a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPaySignerFactory.cs b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPaySignerFactory.cs index 6c527ebe30..654d90379d 100644 --- a/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPaySignerFactory.cs +++ b/src/Senparc.Weixin.TenPay/Senparc.Weixin.TenPayV3/TenPayHttpClient/TenPaySignerFactory.cs @@ -14,7 +14,7 @@ public static class TenPayCertFactory /// /// 获取签名对象 /// - /// + /// /// /// public static ISigner GetSigner(CertType certType) @@ -33,7 +33,7 @@ public static ISigner GetSigner(CertType certType) /// /// 获取验签对象 /// - /// + /// /// /// public static IVerifier GetVerifier(CertType certType)