-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
郑大松
authored and
郑大松
committed
Jun 2, 2023
1 parent
8717a8b
commit dc262d1
Showing
26 changed files
with
2,588 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Magicodes.Pay.Icbc.Dto; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Magicodes.Pay.Icbc | ||
{ | ||
public class B2cAggregatedPayOutput | ||
{ | ||
public CardbusinessAggregatepayB2cOnlineConsumepurchaseResponseV1 Response { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Magicodes.Pay.Icbc.Builder | ||
{ | ||
public class IcbcpayBuilder | ||
{ | ||
private Action<string, string> LoggerAction { get; set; } | ||
|
||
private Func<IIcbcpaySettings> GetPayConfigFunc { get; set; } | ||
|
||
/// <summary> | ||
/// 创建实例 | ||
/// </summary> | ||
/// <returns></returns> | ||
public static IcbcpayBuilder Create() | ||
{ | ||
return new IcbcpayBuilder(); | ||
} | ||
|
||
/// <summary> | ||
/// 设置日志记录处理 | ||
/// </summary> | ||
/// <param name="loggerAction"></param> | ||
/// <returns></returns> | ||
public IcbcpayBuilder WithLoggerAction(Action<string, string> loggerAction) | ||
{ | ||
LoggerAction = loggerAction; | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// 注册配置获取逻辑 | ||
/// </summary> | ||
/// <param name="func"></param> | ||
/// <returns></returns> | ||
public IcbcpayBuilder RegisterGetPayConfigFunc(Func<IIcbcpaySettings> func) | ||
{ | ||
GetPayConfigFunc = func; | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// 确定设置 | ||
/// </summary> | ||
public void Build() | ||
{ | ||
if (LoggerAction != null) | ||
IcbcpayAppService.LoggerAction = LoggerAction; | ||
|
||
if (GetPayConfigFunc != null) | ||
IcbcpayAppService.GetPayConfigFunc = GetPayConfigFunc; | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.