-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
4 changed files
with
60 additions
and
28 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
59 changes: 59 additions & 0 deletions
59
src/WWB.Paylink.BaoFooTransfer/Response/BaseUnionGWResponse.cs
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,59 @@ | ||
using Newtonsoft.Json; | ||
using WWB.Paylink.BaoFooTransfer.Domain; | ||
|
||
namespace WWB.Paylink.BaoFooTransfer.Response | ||
{ | ||
public abstract class BaseUnionGWResponse<T> : BaseResponse | ||
{ | ||
/// <summary> | ||
/// 宝付提供给商户的唯一编号 | ||
/// </summary> | ||
[JsonIgnore] | ||
public string MemberId { get; set; } | ||
|
||
/// <summary> | ||
/// 服务编号 | ||
/// </summary> | ||
[JsonIgnore] | ||
public string ServiceTp { get; set; } | ||
|
||
/// <summary> | ||
/// 终端号 | ||
/// </summary> | ||
[JsonIgnore] | ||
public string TerminalId { get; set; } | ||
|
||
/// <summary> | ||
/// 系统返回码 | ||
/// </summary> | ||
[JsonIgnore] | ||
public string SysRespCode { get; set; } | ||
|
||
/// <summary> | ||
/// 系统返回信息 | ||
/// </summary> | ||
[JsonIgnore] | ||
public string SysRespDesc { get; set; } | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
[JsonIgnore] | ||
public T Body { get; set; } | ||
|
||
/// <summary> | ||
/// 处理器 | ||
/// </summary> | ||
internal override void Execute() | ||
{ | ||
var result = JsonConvert.DeserializeObject<UnionGWResultWraper<T>>(Raw); | ||
|
||
MemberId = result.Header.MemberId; | ||
ServiceTp = result.Header.ServiceTp; | ||
TerminalId = result.Header.TerminalId; | ||
SysRespCode = result.Header.SysRespCode; | ||
SysRespDesc = result.Header.SysRespDesc; | ||
Body = result.Body; | ||
} | ||
} | ||
} |
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