-
Notifications
You must be signed in to change notification settings - Fork 86
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 #99 from EasyAbp/wechatpay-v3-jspayment
Implemented all request interfaces for JS API payment. (Excludes notification interfaces)
- Loading branch information
Showing
26 changed files
with
1,247 additions
and
82 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
6 changes: 3 additions & 3 deletions
6
...ervices/BasicPayment/PromotionTypeEnum.cs → ...ices/BasicPayment/Enums/CouponTypeEnum.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
22 changes: 22 additions & 0 deletions
22
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/FundAccountTypeEnum.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,22 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 资金账户类型枚举。 | ||
/// </summary> | ||
public static class FundAccountTypeEnum | ||
{ | ||
/// <summary> | ||
/// 基本账户。 | ||
/// </summary> | ||
public const string Basic = "BASIC"; | ||
|
||
/// <summary> | ||
/// 运营账户。 | ||
/// </summary> | ||
public const string Operation = "OPERATION"; | ||
|
||
/// <summary> | ||
/// 手续费账户。 | ||
/// </summary> | ||
public const string Fees = "FEES"; | ||
} |
2 changes: 1 addition & 1 deletion
2
...rvices/BasicPayment/PromotionScopeEnum.cs → .../BasicPayment/Enums/PromotionScopeEnum.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
17 changes: 17 additions & 0 deletions
17
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/PromotionTypeEnum.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,17 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 优惠类型的枚举值定义。 | ||
/// </summary> | ||
public static class PromotionTypeEnum | ||
{ | ||
/// <summary> | ||
/// 代金券,需要走结算资金的充值型代金券。 | ||
/// </summary> | ||
public const string Coupon = "COUPON"; | ||
|
||
/// <summary> | ||
/// 优惠券,不走结算资金的免充值型优惠券。 | ||
/// </summary> | ||
public const string Discount = "DISCOUNT"; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/RefundChannelEnum.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,27 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 退款渠道枚举。 | ||
/// </summary> | ||
public static class RefundChannelEnum | ||
{ | ||
/// <summary> | ||
/// 原路退款。 | ||
/// </summary> | ||
public const string Original = "ORIGINAL"; | ||
|
||
/// <summary> | ||
/// 退回到余额。 | ||
/// </summary> | ||
public const string Balance = "BALANCE"; | ||
|
||
/// <summary> | ||
/// 原账户异常退到其他余额账户。 | ||
/// </summary> | ||
public const string OtherBalance = "OTHER_BALANCE"; | ||
|
||
/// <summary> | ||
/// 原银行卡异常退到其他银行卡。 | ||
/// </summary> | ||
public const string OtherBankCard = "OTHER_BANKCARD"; | ||
} |
32 changes: 32 additions & 0 deletions
32
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/RefundFundsAccountEnum.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,32 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 退款资金来源枚举。 | ||
/// </summary> | ||
public static class RefundFundsAccountEnum | ||
{ | ||
/// <summary> | ||
/// 可用余额账户。 | ||
/// </summary> | ||
public const string Available = "AVAILABLE"; | ||
|
||
/// <summary> | ||
/// 不可用余额账户。 | ||
/// </summary> | ||
public const string Unavailable = "UNAVAILABLE"; | ||
|
||
/// <summary> | ||
/// 未结算资金账户。 | ||
/// </summary> | ||
public const string Unsettled = "UNSETTLED"; | ||
|
||
/// <summary> | ||
/// 运营账户。 | ||
/// </summary> | ||
public const string Operation = "OPERATION"; | ||
|
||
/// <summary> | ||
/// 基本账户。 | ||
/// </summary> | ||
public const string Basic= "BASIC"; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/RefundStatusEnum.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,27 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 退款状态枚举。 | ||
/// </summary> | ||
public static class RefundStatusEnum | ||
{ | ||
/// <summary> | ||
/// 退款成功。 | ||
/// </summary> | ||
public const string Success = "SUCCESS"; | ||
|
||
/// <summary> | ||
/// 退款关闭。 | ||
/// </summary> | ||
public const string Closed = "CLOSED"; | ||
|
||
/// <summary> | ||
/// 退款处理中。 | ||
/// </summary> | ||
public const string Processing = "PROCESSING"; | ||
|
||
/// <summary> | ||
/// 退款异常。 | ||
/// </summary> | ||
public const string Abnormal = "ABNORMAL"; | ||
} |
2 changes: 1 addition & 1 deletion
2
...y/Services/BasicPayment/TradeStateEnum.cs → ...ices/BasicPayment/Enums/TradeStateEnum.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
2 changes: 1 addition & 1 deletion
2
...ay/Services/BasicPayment/TradeTypeEnum.cs → ...vices/BasicPayment/Enums/TradeTypeEnum.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
22 changes: 22 additions & 0 deletions
22
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Enums/TransactionBillTypeEnum.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,22 @@ | ||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Enums; | ||
|
||
/// <summary> | ||
/// 账单类型枚举。 | ||
/// </summary> | ||
public static class TransactionBillTypeEnum | ||
{ | ||
/// <summary> | ||
/// 回当日所有订单信息 (不含充值退款订单)。 | ||
/// </summary> | ||
public const string All = "ALL"; | ||
|
||
/// <summary> | ||
/// 返回当日成功支付的订单 (不含充值退款订单)。 | ||
/// </summary> | ||
public const string Success = "SUCCESS"; | ||
|
||
/// <summary> | ||
/// 返回当日退款订单 (不含充值退款订单)。 | ||
/// </summary> | ||
public const string Refund = "REFUND"; | ||
} |
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
35 changes: 35 additions & 0 deletions
35
src/Pay/EasyAbp.Abp.WeChat.Pay/Services/BasicPayment/Models/CloseOrderRequest.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,35 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using Newtonsoft.Json; | ||
|
||
namespace EasyAbp.Abp.WeChat.Pay.Services.BasicPayment.Models; | ||
|
||
public class CloseOrderRequest | ||
{ | ||
/// <summary> | ||
/// 直连商户号。 | ||
/// </summary> | ||
/// <remarks> | ||
/// 直连商户的商户号,由微信支付生成并下发。 | ||
/// </remarks> | ||
/// <example> | ||
/// 示例值: 1230000109 | ||
/// </example> | ||
[Required] | ||
[StringLength(32, MinimumLength = 1)] | ||
[JsonProperty("mchid")] | ||
public string MchId { get; set; } | ||
|
||
/// <summary> | ||
/// 商户订单号。 | ||
/// </summary> | ||
/// <remarks> | ||
/// 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 | ||
/// </remarks> | ||
/// <example> | ||
/// 示例值: 1217752501201407033233368018 | ||
/// </example> | ||
[Required] | ||
[StringLength(32,MinimumLength = 6)] | ||
[JsonProperty("out_trade_no")] | ||
public string OutTradeNo { get; set; } | ||
} |
Oops, something went wrong.