From 3f784c43742ff027e02ccb47432aaf407d8abbbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=81=B0=E7=81=B0?= Date: Mon, 14 Jun 2021 18:17:29 +0800 Subject: [PATCH] =?UTF-8?q?!14=20=E5=8D=87=E7=BA=A7=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E3=80=82=E4=BF=AE=E5=A4=8D=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A6=96=E9=A1=B5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=AF=BC=E8=87=B4sql=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=20*=201=E3=80=81=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=BB=84=E4=BB=B6=E4=BB=8EPayment=20?= =?UTF-8?q?=E5=88=B0Paylink=E3=80=822=E3=80=81=E4=BF=AE=E5=A4=8Dpage?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=96=E6=95=B0=E6=8D=AE=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=20*=20=E8=B0=83=E6=95=B4=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E7=BB=84=E4=BB=B6=20*=20=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E7=BB=86=E8=8A=82=E5=BE=AE=E8=B0=83=20*=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BB=86=E8=8A=82=20*=20=E4=BF=AE=E5=A4=8D=E9=80=9A?= =?UTF-8?q?=E8=BF=87core=20first=E7=94=9F=E6=88=90mysql=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E4=B8=A4=E4=B8=AA=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?=20*=20=E7=BB=8F=E8=BF=87=E6=B5=8B=E8=AF=95=EF=BC=8Cmysql?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E9=9C=80=E8=A6=815.7=E6=88=96=E4=BB=A5?= =?UTF-8?q?=E4=B8=8A=20*=20=E5=A2=9E=E5=8A=A0HangFire=E5=88=B0=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppSettingsConstVars.cs | 5 ---- CoreCms.Net.Core/Config/HangFireSetup.cs | 2 +- .../CoreCms.Net.RedisMQ.csproj | 2 +- .../Subscribe/OrderPrintSubscribe.cs | 2 -- .../Subscribe/OrderSubscribe.cs | 4 +-- .../CoreCms.Net.Repository.csproj | 2 +- .../CoreCms.Net.Services.csproj | 2 +- CoreCms.Net.Services/Pay/WeChatPayServices.cs | 7 +++-- .../Shop/CoreCmsPagesServices.cs | 19 +++++++++++-- .../Controllers/Com/DemoController.cs | 14 ---------- .../Stock/CoreCmsStockController.cs | 1 - .../CoreCms.Net.Web.Admin.csproj | 4 +-- CoreCms.Net.Web.Admin/Startup.cs | 21 ++------------- CoreCms.Net.Web.Admin/appsettings.json | 27 ++++++++++++------- .../Controllers/PayNotify/AliPayController.cs | 6 ++--- .../PayNotify/WeChatPayController.cs | 6 ++--- .../CoreCms.Net.Web.WebApi.csproj | 4 +-- CoreCms.Net.Web.WebApi/Startup.cs | 7 ++--- CoreCms.Net.Web.WebApi/appsettings.json | 27 ++++++++++++------- 19 files changed, 76 insertions(+), 86 deletions(-) diff --git a/CoreCms.Net.Configuration/AppSettingsConstVars.cs b/CoreCms.Net.Configuration/AppSettingsConstVars.cs index 3271f00..349c6f1 100644 --- a/CoreCms.Net.Configuration/AppSettingsConstVars.cs +++ b/CoreCms.Net.Configuration/AppSettingsConstVars.cs @@ -24,7 +24,6 @@ namespace CoreCms.Net.Configuration public static readonly string AppConfigAppInterFaceUrl = AppSettingsHelper.GetContent("AppConfig", "AppInterFaceUrl"); #endregion - #region 数据库================================================================================ /// /// 获取数据库连接字符串 @@ -55,7 +54,6 @@ namespace CoreCms.Net.Configuration #endregion - #region AOP================================================================================ /// /// 事务切面开关 @@ -71,14 +69,12 @@ namespace CoreCms.Net.Configuration public static readonly string JwtConfigAudience = AppSettingsHelper.GetContent("JwtConfig", "Audience"); #endregion - #region Cors跨域设置================================================================================ public static readonly string CorsPolicyName = AppSettingsHelper.GetContent("Cors", "PolicyName"); public static readonly bool CorsEnableAllIPs = AppSettingsHelper.GetContent("Cors", "EnableAllIPs").ObjToBool(); public static readonly string CorsIPs = AppSettingsHelper.GetContent("Cors", "IPs"); #endregion - #region Middleware中间件================================================================================ /// /// Ip限流 @@ -119,7 +115,6 @@ namespace CoreCms.Net.Configuration public static readonly string PayCallBackAlipayRefundUrl = AppSettingsHelper.GetContent("PayCallBack", "AlipayRefundUrl"); #endregion - #region 易联云打印机================================================================================ /// diff --git a/CoreCms.Net.Core/Config/HangFireSetup.cs b/CoreCms.Net.Core/Config/HangFireSetup.cs index 6da31c4..9180186 100644 --- a/CoreCms.Net.Core/Config/HangFireSetup.cs +++ b/CoreCms.Net.Core/Config/HangFireSetup.cs @@ -26,7 +26,7 @@ namespace CoreCms.Net.Core.Config /// public static class HangFireSetup { - public static void AddHangFireSetupSetup(this IServiceCollection services) + public static void AddHangFireSetup(this IServiceCollection services) { if (services == null) throw new ArgumentNullException(nameof(services)); diff --git a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj index d0380a0..6f96834 100644 --- a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj +++ b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj @@ -5,7 +5,7 @@ - + diff --git a/CoreCms.Net.RedisMQ/Subscribe/OrderPrintSubscribe.cs b/CoreCms.Net.RedisMQ/Subscribe/OrderPrintSubscribe.cs index ebab54e..d5c8015 100644 --- a/CoreCms.Net.RedisMQ/Subscribe/OrderPrintSubscribe.cs +++ b/CoreCms.Net.RedisMQ/Subscribe/OrderPrintSubscribe.cs @@ -7,8 +7,6 @@ using CoreCms.Net.IServices; using CoreCms.Net.Loging; using CoreCms.Net.Model.Entities; using CoreCms.Net.Utility.Helper; -using Essensoft.AspNetCore.Payment.WeChatPay.V2; -using Essensoft.AspNetCore.Payment.WeChatPay.V2.Notify; using InitQ.Abstractions; using InitQ.Attributes; using Microsoft.Extensions.Logging; diff --git a/CoreCms.Net.RedisMQ/Subscribe/OrderSubscribe.cs b/CoreCms.Net.RedisMQ/Subscribe/OrderSubscribe.cs index b40e25a..6cb9d09 100644 --- a/CoreCms.Net.RedisMQ/Subscribe/OrderSubscribe.cs +++ b/CoreCms.Net.RedisMQ/Subscribe/OrderSubscribe.cs @@ -7,8 +7,8 @@ using CoreCms.Net.Model.Entities; using CoreCms.Net.Model.ViewModels.UI; using CoreCms.Net.Utility.Extensions; using CoreCms.Net.Utility.Helper; -using Essensoft.AspNetCore.Payment.WeChatPay.V2; -using Essensoft.AspNetCore.Payment.WeChatPay.V2.Notify; +using Essensoft.Paylink.WeChatPay.V2; +using Essensoft.Paylink.WeChatPay.V2.Notify; using InitQ.Abstractions; using InitQ.Attributes; using Microsoft.Extensions.Logging; diff --git a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj index e42608a..0ed95a9 100644 --- a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj +++ b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj @@ -6,7 +6,7 @@ - + diff --git a/CoreCms.Net.Services/CoreCms.Net.Services.csproj b/CoreCms.Net.Services/CoreCms.Net.Services.csproj index bd12332..d0aa54b 100644 --- a/CoreCms.Net.Services/CoreCms.Net.Services.csproj +++ b/CoreCms.Net.Services/CoreCms.Net.Services.csproj @@ -11,7 +11,7 @@ - + diff --git a/CoreCms.Net.Services/Pay/WeChatPayServices.cs b/CoreCms.Net.Services/Pay/WeChatPayServices.cs index e560c66..5cb1db3 100644 --- a/CoreCms.Net.Services/Pay/WeChatPayServices.cs +++ b/CoreCms.Net.Services/Pay/WeChatPayServices.cs @@ -18,10 +18,9 @@ using CoreCms.Net.IServices; using CoreCms.Net.Model.Entities; using CoreCms.Net.Model.ViewModels.UI; using CoreCms.Net.Utility.Extensions; -using Essensoft.AspNetCore.Payment.WeChatPay; -//using Essensoft.AspNetCore.Payment.WeChatPay.Request; -using Essensoft.AspNetCore.Payment.WeChatPay.V2; -using Essensoft.AspNetCore.Payment.WeChatPay.V2.Request; +using Essensoft.Paylink.WeChatPay; +using Essensoft.Paylink.WeChatPay.V2; +using Essensoft.Paylink.WeChatPay.V2.Request; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs b/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs index 4997a31..ac96999 100644 --- a/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs +++ b/CoreCms.Net.Services/Shop/CoreCmsPagesServices.cs @@ -158,7 +158,14 @@ namespace CoreCms.Net.Services { noticeIdsStr = string.Join(",", noticeIdsStr); //按照固定的序列id进行排序 - orderBy = " CHARINDEX(RTRIM(CAST(id as NCHAR)),'" + noticeIdsStr + "') "; + if (AppSettingsConstVars.DbDbType == DbType.SqlServer.ToString()) + { + orderBy = " CHARINDEX(RTRIM(CAST(id as NCHAR)),'" + noticeIdsStr + "') "; + } + else if (AppSettingsConstVars.DbDbType == DbType.MySql.ToString()) + { + orderBy = " find_in_set(id,'" + noticeIdsStr + "') "; + } } } var notices = await _noticeServices.QueryListByClauseAsync(where, orderBy); @@ -289,7 +296,15 @@ namespace CoreCms.Net.Services if (goodids.Any()) { goodidsStr = string.Join(",", goodids); - orderBy = " CHARINDEX(RTRIM(CAST(id as NCHAR)),'" + goodidsStr + "') "; + //按照id序列打乱后的顺序排序 + if (AppSettingsConstVars.DbDbType == DbType.SqlServer.ToString()) + { + orderBy = " CHARINDEX(RTRIM(CAST(id as NCHAR)),'" + goodidsStr + "') "; + } + else if (AppSettingsConstVars.DbDbType == DbType.MySql.ToString()) + { + orderBy = " find_in_set(id,'" + goodidsStr + "') "; + } } } var goods = await _goodsServices.QueryListByClauseAsync(where, orderBy); diff --git a/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs b/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs index 524a1f6..73f279b 100644 --- a/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs @@ -7,26 +7,12 @@ * CreateTime: 2021/1/31 21:45:10 * Description: 暂无 ***********************************************************************/ - -using System; -using System.Collections.Generic; -using System.IO; using System.Threading.Tasks; using AutoMapper; using CoreCms.Net.Caching.AutoMate.RedisCache; -using CoreCms.Net.Configuration; using CoreCms.Net.IServices; -using CoreCms.Net.Model.ViewModels.Api; using CoreCms.Net.Model.ViewModels.UI; -using CoreCms.Net.Utility.Helper; -using Essensoft.AspNetCore.Payment.Alipay.Domain; -using Flurl; -using Flurl.Http; -using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using NPOI.HSSF.UserModel; -using SqlSugar; namespace CoreCms.Net.Web.Admin.Controllers { diff --git a/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs b/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs index beb46c2..29c09f5 100644 --- a/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/Stock/CoreCmsStockController.cs @@ -25,7 +25,6 @@ using CoreCms.Net.Loging; using CoreCms.Net.IServices; using CoreCms.Net.Utility.Helper; using CoreCms.Net.Utility.Extensions; -using Essensoft.AspNetCore.Payment.Alipay.Domain; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; diff --git a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj index 03b82c3..7241c19 100644 --- a/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj +++ b/CoreCms.Net.Web.Admin/CoreCms.Net.Web.Admin.csproj @@ -51,8 +51,8 @@ - - + + diff --git a/CoreCms.Net.Web.Admin/Startup.cs b/CoreCms.Net.Web.Admin/Startup.cs index 046d5d8..93e14e1 100644 --- a/CoreCms.Net.Web.Admin/Startup.cs +++ b/CoreCms.Net.Web.Admin/Startup.cs @@ -1,33 +1,19 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Reflection; using Autofac; -using Autofac.Extras.DynamicProxy; -using AutoMapper; using CoreCms.Net.Auth; using CoreCms.Net.Configuration; -using CoreCms.Net.Core.AOP; using CoreCms.Net.Core.AutoFac; using CoreCms.Net.Core.Config; using CoreCms.Net.Filter; using CoreCms.Net.Loging; using CoreCms.Net.Mapping; using CoreCms.Net.Middlewares; -using CoreCms.Net.Model.ViewModels.Options; -using CoreCms.Net.Model.ViewModels.Sms; -using CoreCms.Net.Repository.CodeGenerator; -using CoreCms.Net.Services.CodeGenerator; using CoreCms.Net.Services.Mediator; using CoreCms.Net.Swagger; -using CoreCms.Net.Task; -using CoreCms.Net.Utility.Extensions; -using CoreCms.Net.WeChatService.CustomMessageHandler; -using CoreCms.Net.WeChatService.MessageHandlers.WebSocket; -using CoreCms.Net.WeChatService.WxOpenMessageHandler; -using Essensoft.AspNetCore.Payment.Alipay; -using Essensoft.AspNetCore.Payment.WeChatPay; +using Essensoft.Paylink.Alipay; +using Essensoft.Paylink.WeChatPay; using MediatR; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -42,13 +28,10 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using Qc.YilianyunSdk; using Senparc.CO2NET; using Senparc.CO2NET.AspNet; -using Senparc.WebSocket; using Senparc.Weixin; using Senparc.Weixin.Entities; -using Senparc.Weixin.MP; using Senparc.Weixin.RegisterServices; using Senparc.Weixin.WxOpen; using SqlSugar; diff --git a/CoreCms.Net.Web.Admin/appsettings.json b/CoreCms.Net.Web.Admin/appsettings.json index 70582e5..3b4bbb3 100644 --- a/CoreCms.Net.Web.Admin/appsettings.json +++ b/CoreCms.Net.Web.Admin/appsettings.json @@ -77,25 +77,33 @@ //打印机设置联系电话 "Phone": "" }, + // 微信支付 + // 更多配置,请查看WeChatPayOptions类 "WeChatPay": { - //应用号(公众平台AppId/开放平台AppId/小程序AppId/企业微信CorpId) + // 应用号 + // 如:微信公众平台AppId、微信开放平台AppId、微信小程序AppId、企业微信CorpId等 "AppId": "", - //商户号 + // 商户号 + // 为微信支付商户平台的商户号 "MchId": "", - //API秘钥,不是APIv3密钥 - "Key": "", + // API密钥 + // 为微信支付商户平台的API密钥,请注意不是APIv3密钥 + "APIKey": "", // APIv3密钥 // 为微信支付商户平台的APIv3密钥,请注意不是API密钥,v3接口必填 - "V3Key": "", - //API证书 .p12 + "APIv3Key": "", + // API证书(.p12) + // 为微信支付商户平台的API证书(.p12),v3接口必填 + // 可为证书文件(.p12)路径 / 证书文件(.p12)的base64字符串 "Certificate": "WxPayCert\\apiclient_cert.p12", - //RSA公钥 (目前仅"企业付款到银行卡API"使用,调用"获取RSA加密公钥API"即可获取) + // RSA公钥 + // 目前仅调用"企业付款到银行卡API"时使用,执行本示例中的"获取RSA加密公钥API"即可获取。 "RsaPublicKey": "" }, // 支付宝(暂未开通) // 更多配置,请查看AlipayOptions类 "Alipay": { - // 注意: + // 注意: // 若涉及资金类支出接口(如转账、红包等)接入,必须使用“公钥证书”方式。不涉及到资金类接口,也可以使用“普通公钥”方式进行加签。 // 本示例默认的加签方式为“公钥证书”方式,并调用 CertificateExecuteAsync 方法 执行API。 // 若使用“普通公钥”方式,除了遵守下方注释的规则外,调用 CertificateExecuteAsync 也需改成 ExecuteAsync。 @@ -104,7 +112,6 @@ // 应用Id // 为支付宝开放平台-APPID "AppId": "", - // 支付宝公钥 RSA公钥 // 为支付宝开放平台-支付宝公钥 // “公钥证书”方式时,留空 @@ -124,7 +131,7 @@ // 可为证书文件路径 / 证书文件的base64字符串 // “公钥证书”方式时,必填 // “普通公钥”方式时,留空 - "AppCert": "", + "AppPublicCert": "", // 支付宝公钥证书 // 可为证书文件路径 / 证书文件的base64字符串 // “公钥证书”方式时,必填 diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs index 097f15b..fabbd85 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs @@ -11,9 +11,9 @@ using System; using System.Threading.Tasks; using System.Xml; -using Essensoft.AspNetCore.Payment.Alipay; -using Essensoft.AspNetCore.Payment.Alipay.Notify; -using Essensoft.AspNetCore.Payment.Alipay.Utility; +using Essensoft.Paylink.Alipay; +using Essensoft.Paylink.Alipay.Notify; +using Essensoft.Paylink.Alipay.Utility; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs index bfb8b64..bf417a3 100644 --- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs +++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs @@ -12,7 +12,6 @@ using CoreCms.Net.Configuration; using CoreCms.Net.IServices; using CoreCms.Net.Loging; using CoreCms.Net.Model.Entities; -using Essensoft.AspNetCore.Payment.WeChatPay; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using Newtonsoft.Json; @@ -20,8 +19,9 @@ using NLog; using System; using System.Threading.Tasks; using CoreCms.Net.Caching.AutoMate.RedisCache; -using Essensoft.AspNetCore.Payment.WeChatPay.V2; -using Essensoft.AspNetCore.Payment.WeChatPay.V2.Notify; +using Essensoft.Paylink.WeChatPay; +using Essensoft.Paylink.WeChatPay.V2; +using Essensoft.Paylink.WeChatPay.V2.Notify; namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify { diff --git a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj index 5c5b764..738e2cb 100644 --- a/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj +++ b/CoreCms.Net.Web.WebApi/CoreCms.Net.Web.WebApi.csproj @@ -42,8 +42,8 @@ - - + + diff --git a/CoreCms.Net.Web.WebApi/Startup.cs b/CoreCms.Net.Web.WebApi/Startup.cs index e72e3b9..c2441d1 100644 --- a/CoreCms.Net.Web.WebApi/Startup.cs +++ b/CoreCms.Net.Web.WebApi/Startup.cs @@ -13,8 +13,6 @@ using CoreCms.Net.Model.ViewModels.Sms; using CoreCms.Net.Services.Mediator; using CoreCms.Net.Swagger; using CoreCms.Net.Task; -using Essensoft.AspNetCore.Payment.Alipay; -using Essensoft.AspNetCore.Payment.WeChatPay; using Hangfire; using Hangfire.Dashboard.BasicAuthorization; using InitQ; @@ -43,6 +41,8 @@ using System.Collections.Generic; using System.Linq; using CoreCms.Net.RedisMQ.Subscribe; using CoreCms.Net.Utility.Extensions; +using Essensoft.Paylink.Alipay; +using Essensoft.Paylink.WeChatPay; namespace CoreCms.Net.Web.WebApi { @@ -117,7 +117,8 @@ namespace CoreCms.Net.Web.WebApi services.AddYiLianYunSetup(); //עHangfireʱ - services.AddHangFireSetupSetup(); + services.AddHangFireSetup(); + //Ȩ֧ע services.AddAuthorizationSetupForClient(); diff --git a/CoreCms.Net.Web.WebApi/appsettings.json b/CoreCms.Net.Web.WebApi/appsettings.json index 70582e5..3b4bbb3 100644 --- a/CoreCms.Net.Web.WebApi/appsettings.json +++ b/CoreCms.Net.Web.WebApi/appsettings.json @@ -77,25 +77,33 @@ //打印机设置联系电话 "Phone": "" }, + // 微信支付 + // 更多配置,请查看WeChatPayOptions类 "WeChatPay": { - //应用号(公众平台AppId/开放平台AppId/小程序AppId/企业微信CorpId) + // 应用号 + // 如:微信公众平台AppId、微信开放平台AppId、微信小程序AppId、企业微信CorpId等 "AppId": "", - //商户号 + // 商户号 + // 为微信支付商户平台的商户号 "MchId": "", - //API秘钥,不是APIv3密钥 - "Key": "", + // API密钥 + // 为微信支付商户平台的API密钥,请注意不是APIv3密钥 + "APIKey": "", // APIv3密钥 // 为微信支付商户平台的APIv3密钥,请注意不是API密钥,v3接口必填 - "V3Key": "", - //API证书 .p12 + "APIv3Key": "", + // API证书(.p12) + // 为微信支付商户平台的API证书(.p12),v3接口必填 + // 可为证书文件(.p12)路径 / 证书文件(.p12)的base64字符串 "Certificate": "WxPayCert\\apiclient_cert.p12", - //RSA公钥 (目前仅"企业付款到银行卡API"使用,调用"获取RSA加密公钥API"即可获取) + // RSA公钥 + // 目前仅调用"企业付款到银行卡API"时使用,执行本示例中的"获取RSA加密公钥API"即可获取。 "RsaPublicKey": "" }, // 支付宝(暂未开通) // 更多配置,请查看AlipayOptions类 "Alipay": { - // 注意: + // 注意: // 若涉及资金类支出接口(如转账、红包等)接入,必须使用“公钥证书”方式。不涉及到资金类接口,也可以使用“普通公钥”方式进行加签。 // 本示例默认的加签方式为“公钥证书”方式,并调用 CertificateExecuteAsync 方法 执行API。 // 若使用“普通公钥”方式,除了遵守下方注释的规则外,调用 CertificateExecuteAsync 也需改成 ExecuteAsync。 @@ -104,7 +112,6 @@ // 应用Id // 为支付宝开放平台-APPID "AppId": "", - // 支付宝公钥 RSA公钥 // 为支付宝开放平台-支付宝公钥 // “公钥证书”方式时,留空 @@ -124,7 +131,7 @@ // 可为证书文件路径 / 证书文件的base64字符串 // “公钥证书”方式时,必填 // “普通公钥”方式时,留空 - "AppCert": "", + "AppPublicCert": "", // 支付宝公钥证书 // 可为证书文件路径 / 证书文件的base64字符串 // “公钥证书”方式时,必填