From 4400bd4883aab583dd1fb49c1b6d6d833dc36743 Mon Sep 17 00:00:00 2001 From: yzp Date: Fri, 28 Feb 2025 23:26:05 +0800 Subject: [PATCH] =?UTF-8?q?CreatePayTransaction=E7=94=9F=E6=88=90=E5=AE=9A?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E5=90=8C=E6=97=B6=E8=BF=94=E5=9B=9E=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E5=87=8F=E5=B0=91=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Wechat/Dto/WechatPayOutput.cs | 20 +++++++++---------- .../Service/Wechat/SysWechatPayService.cs | 5 +++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Wechat/Dto/WechatPayOutput.cs b/Admin.NET/Admin.NET.Core/Service/Wechat/Dto/WechatPayOutput.cs index 5e2bc2e2..d65d1e7b 100644 --- a/Admin.NET/Admin.NET.Core/Service/Wechat/Dto/WechatPayOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Wechat/Dto/WechatPayOutput.cs @@ -68,23 +68,23 @@ public class CreatePayTransactionOutput { public string PrepayId { get; set; } public string OutTradeNumber { get; set; } - //public WechatPayParaOutput SingInfo { get; set; } + public WechatPayParaOutput SingInfo { get; set; } } -//public class WechatPayParaOutput -//{ -// public string AppId { get; set; } +public class WechatPayParaOutput +{ + public string AppId { get; set; } -// public string TimeStamp { get; set; } + public string TimeStamp { get; set; } -// public string NonceStr { get; set; } + public string NonceStr { get; set; } -// public string Package { get; set; } + public string Package { get; set; } -// public string SignType { get; set; } + public string SignType { get; set; } -// public string PaySign { get; set; } -//} + public string PaySign { get; set; } +} public class CreatePayTransactionNativeOutput { diff --git a/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs b/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs index a7a4fcb5..38eaafa2 100644 --- a/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Wechat/SysWechatPayService.cs @@ -5,6 +5,7 @@ // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! using Furion.Logging.Extensions; +using NewLife; using Newtonsoft.Json; namespace Admin.NET.Core.Service; @@ -135,12 +136,12 @@ public class SysWechatPayService : IDynamicApiController, ITransient await _sysWechatPayRep.InsertAsync(wechatPay); } - //var singInfo = GenerateParametersForJsapiPay(new WechatPayParaInput() { PrepayId = response.PrepayId }); + var singInfo = GenerateParametersForJsapiPay(new WechatPayParaInput() { PrepayId = response.PrepayId }); return new CreatePayTransactionOutput { PrepayId = response.PrepayId, OutTradeNumber = request.OutTradeNumber, - //SingInfo = singInfo + SingInfo = singInfo }; }