CreatePayTransaction生成定单时同时返回签名,减少客户端调用接口的代码

This commit is contained in:
yzp 2025-02-28 23:26:05 +08:00
parent 144fd6ead2
commit 4400bd4883
2 changed files with 13 additions and 12 deletions

View File

@ -68,23 +68,23 @@ public class CreatePayTransactionOutput
{ {
public string PrepayId { get; set; } public string PrepayId { get; set; }
public string OutTradeNumber { get; set; } public string OutTradeNumber { get; set; }
//public WechatPayParaOutput SingInfo { get; set; } public WechatPayParaOutput SingInfo { get; set; }
} }
//public class WechatPayParaOutput public class WechatPayParaOutput
//{ {
// public string AppId { get; set; } 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 public class CreatePayTransactionNativeOutput
{ {

View File

@ -5,6 +5,7 @@
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Furion.Logging.Extensions; using Furion.Logging.Extensions;
using NewLife;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Admin.NET.Core.Service; namespace Admin.NET.Core.Service;
@ -135,12 +136,12 @@ public class SysWechatPayService : IDynamicApiController, ITransient
await _sysWechatPayRep.InsertAsync(wechatPay); await _sysWechatPayRep.InsertAsync(wechatPay);
} }
//var singInfo = GenerateParametersForJsapiPay(new WechatPayParaInput() { PrepayId = response.PrepayId }); var singInfo = GenerateParametersForJsapiPay(new WechatPayParaInput() { PrepayId = response.PrepayId });
return new CreatePayTransactionOutput return new CreatePayTransactionOutput
{ {
PrepayId = response.PrepayId, PrepayId = response.PrepayId,
OutTradeNumber = request.OutTradeNumber, OutTradeNumber = request.OutTradeNumber,
//SingInfo = singInfo SingInfo = singInfo
}; };
} }