-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from EasyAbp/wechatpay-v3-jspayment
WeChat Pay Notification Callback
- Loading branch information
Showing
24 changed files
with
353 additions
and
286 deletions.
There are no files selected for viewing
17 changes: 13 additions & 4 deletions
17
src/Pay/EasyAbp.Abp.WeChat.Pay.Abstractions/RequestHandling/Dtos/PaidNotifyInput.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 |
---|---|---|
@@ -1,13 +1,22 @@ | ||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
using JetBrains.Annotations; | ||
|
||
namespace EasyAbp.Abp.WeChat.Pay.RequestHandling.Dtos; | ||
|
||
[Serializable] | ||
public class PaidNotifyInput | ||
{ | ||
public string MchId { get; set; } | ||
[CanBeNull] public string MchId { get; set; } | ||
|
||
[Required] | ||
public string Xml { get; set; } | ||
public PaymentNotifyCallbackRequest RequestBody { get; set; } | ||
|
||
public string SerialNumber { get; set; } | ||
|
||
public string Timestamp { get; set; } | ||
|
||
public string Nonce { get; set; } | ||
|
||
public string RequestBodyString { get; set; } | ||
|
||
public string Signature { get; set; } | ||
} |
76 changes: 76 additions & 0 deletions
76
.../EasyAbp.Abp.WeChat.Pay.Abstractions/RequestHandling/Dtos/PaymentNotifyCallbackRequest.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,76 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EasyAbp.Abp.WeChat.Pay.RequestHandling.Dtos; | ||
|
||
public class PaymentNotifyCallbackRequest | ||
{ | ||
/// <summary> | ||
/// 通知 ID。 | ||
/// </summary> | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
/// <summary> | ||
/// 通知创建时间。 | ||
/// </summary> | ||
[JsonPropertyName("create_time")] | ||
public DateTime CreateTime { get; set; } | ||
|
||
/// <summary> | ||
/// 通知类型。 | ||
/// </summary> | ||
[JsonPropertyName("event_type")] | ||
public string EventType { get; set; } | ||
|
||
/// <summary> | ||
/// 通知数据类型。 | ||
/// </summary> | ||
[JsonPropertyName("resource_type")] | ||
public string ResourceType { get; set; } | ||
|
||
/// <summary> | ||
/// 回调摘要。 | ||
/// </summary> | ||
[JsonPropertyName("summary")] | ||
public string Summary { get; set; } | ||
|
||
/// <summary> | ||
/// 通知数据。 | ||
/// </summary> | ||
[JsonPropertyName("resource")] | ||
public ResourceModel Resource { get; set; } | ||
|
||
public class ResourceModel | ||
{ | ||
/// <summary> | ||
/// 加密算法类型。 | ||
/// </summary> | ||
[JsonPropertyName("algorithm")] | ||
public string Algorithm { get; set; } | ||
|
||
/// <summary> | ||
/// 数据密文。 | ||
/// </summary> | ||
[JsonPropertyName("ciphertext")] | ||
public string Ciphertext { get; set; } | ||
|
||
/// <summary> | ||
/// 附加数据。 | ||
/// </summary> | ||
[JsonPropertyName("associated_data")] | ||
public string AssociatedData { get; set; } | ||
|
||
/// <summary> | ||
/// 原始类型。 | ||
/// </summary> | ||
[JsonPropertyName("original_type")] | ||
public string OriginalType { get; set; } | ||
|
||
/// <summary> | ||
/// 随机串。 | ||
/// </summary> | ||
[JsonPropertyName("nonce")] | ||
public string Nonce { get; set; } | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...EasyAbp.Abp.WeChat.Pay.Abstractions/RequestHandling/Dtos/PaymentNotifyCallbackResponse.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,18 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace EasyAbp.Abp.WeChat.Pay.RequestHandling.Dtos; | ||
|
||
public class PaymentNotifyCallbackResponse | ||
{ | ||
/// <summary> | ||
/// 返回状态码。 | ||
/// </summary> | ||
[JsonPropertyName("code")] | ||
public string Code { get; set; } | ||
|
||
/// <summary> | ||
/// 返回信息。 | ||
/// </summary> | ||
[JsonPropertyName("message")] | ||
public string Message { 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
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
10 changes: 0 additions & 10 deletions
10
src/Pay/EasyAbp.Abp.WeChat.Pay/RequestHandling/IWeChatPayEventXmlDecrypter.cs
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/Pay/EasyAbp.Abp.WeChat.Pay/RequestHandling/WeChatPayEventModel.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 |
---|---|---|
@@ -1,15 +1,8 @@ | ||
using System.Xml; | ||
using EasyAbp.Abp.WeChat.Pay.Options; | ||
using JetBrains.Annotations; | ||
|
||
namespace EasyAbp.Abp.WeChat.Pay.RequestHandling; | ||
|
||
public class WeChatPayEventModel | ||
{ | ||
public AbpWeChatPayOptions Options { get; set; } | ||
|
||
public XmlDocument WeChatRequestXmlData { get; set; } | ||
|
||
[CanBeNull] | ||
public XmlDocument DecryptedXmlData { get; set; } | ||
} |
Oops, something went wrong.