忽略
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class DaiFu
|
||||
{
|
||||
/// <summary>
|
||||
/// 单笔代付
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> SingleDaiFu(this PaymentCenterHttpClient client, SingleDaiFuRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/ZhongXin/DaiFu/SingleDaiFu", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class DaiFu
|
||||
{
|
||||
/// <summary>
|
||||
/// 单笔代付
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> SingleDaiFu(this PaymentCenterHttpClient client, SingleDaiFuRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/ZhongXin/DaiFu/SingleDaiFu", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
using Hncore.Payment.Request;
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class EPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建Pos机订单(推送订单到Pos机)
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> CreatePosOrder(this PaymentCenterHttpClient client,
|
||||
EPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/EPay/PushOrder", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
using Hncore.Payment.Request;
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class EPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建Pos机订单(推送订单到Pos机)
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> CreatePosOrder(this PaymentCenterHttpClient client,
|
||||
EPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/EPay/PushOrder", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 线下支付
|
||||
/// </summary>
|
||||
public static class OffLinePay
|
||||
{
|
||||
public static async Task<ApiResult> CreateOffLinePaySuccessedRecord(this PaymentCenterHttpClient client,
|
||||
CreateOffLinePaySuccessedRecordRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString(
|
||||
$"{client.BaseUrl}api/paymentcenter/v1/Payment/CreateOffLinePaySuccessedRecord",
|
||||
request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 线下支付
|
||||
/// </summary>
|
||||
public static class OffLinePay
|
||||
{
|
||||
public static async Task<ApiResult> CreateOffLinePaySuccessedRecord(this PaymentCenterHttpClient client,
|
||||
CreateOffLinePaySuccessedRecordRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString(
|
||||
$"{client.BaseUrl}api/paymentcenter/v1/Payment/CreateOffLinePaySuccessedRecord",
|
||||
request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class QrPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult<QrPayCreateOrderResponse>> QrPayCreateOrder(
|
||||
this PaymentCenterHttpClient client,
|
||||
QrPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/QrPay/CreateOrder",
|
||||
request);
|
||||
|
||||
return res.FromJsonTo<ApiResult<QrPayCreateOrderResponse>>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class QrPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult<QrPayCreateOrderResponse>> QrPayCreateOrder(
|
||||
this PaymentCenterHttpClient client,
|
||||
QrPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/QrPay/CreateOrder",
|
||||
request);
|
||||
|
||||
return res.FromJsonTo<ApiResult<QrPayCreateOrderResponse>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class QueryOrderExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单查询
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="orderNo"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult<QueryOrderResponse>> QueryOrder(this PaymentCenterHttpClient client,
|
||||
string orderNo)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.GetStringAsync($"{client.BaseUrl}api/paymentcenter/v1/Payment/QueryOrder?orderNo={orderNo}");
|
||||
|
||||
return res.FromJsonTo<ApiResult<QueryOrderResponse>>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class QueryOrderExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单查询
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="orderNo"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult<QueryOrderResponse>> QueryOrder(this PaymentCenterHttpClient client,
|
||||
string orderNo)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.GetStringAsync($"{client.BaseUrl}api/paymentcenter/v1/Payment/QueryOrder?orderNo={orderNo}");
|
||||
|
||||
return res.FromJsonTo<ApiResult<QueryOrderResponse>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,26 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class SwipeCard
|
||||
{
|
||||
/// <summary>
|
||||
/// 刷卡支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> SwipeCardCreateOrder(this PaymentCenterHttpClient client, SwipeCardCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/SwipeCard/CreateOrder", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class SwipeCard
|
||||
{
|
||||
/// <summary>
|
||||
/// 刷卡支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> SwipeCardCreateOrder(this PaymentCenterHttpClient client, SwipeCardCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateHttpClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}api/paymentcenter/v1/SwipeCard/CreateOrder", request);
|
||||
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.Service;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class WechatJsPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序、公众号支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> WechatJsPayCreateOrder(this ServiceHttpClient client,
|
||||
WechatJsPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateInternalClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}/api/paymentcenter/v1/WechatJsPay/CreateOrder",
|
||||
request);
|
||||
//WechatJsPayCreateOrderResponse
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Hncore.Infrastructure.Serializer;
|
||||
using Hncore.Infrastructure.Service;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Payment.Request;
|
||||
using Hncore.Payment.Response;
|
||||
using PaymentCenterClient;
|
||||
|
||||
namespace Hncore.Payment.ClientExtension
|
||||
{
|
||||
public static class WechatJsPay
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序、公众号支付下单
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<ApiResult> WechatJsPayCreateOrder(this ServiceHttpClient client,
|
||||
WechatJsPayCreateOrderRequest request)
|
||||
{
|
||||
var res = await client.CreateInternalClient()
|
||||
.PostAsJsonGetString($"{client.BaseUrl}/api/paymentcenter/v1/WechatJsPay/CreateOrder",
|
||||
request);
|
||||
//WechatJsPayCreateOrderResponse
|
||||
return res.FromJsonTo<ApiResult>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,25 @@
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum OrderType
|
||||
{
|
||||
/// <summary>
|
||||
/// 短信订单
|
||||
/// </summary>
|
||||
SmsOrder = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 产品订单
|
||||
/// </summary>
|
||||
Product = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 课程订单
|
||||
/// </summary>
|
||||
Course = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 课程套餐订单
|
||||
/// </summary>
|
||||
CoursePackage =3,
|
||||
}
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum OrderType
|
||||
{
|
||||
/// <summary>
|
||||
/// 短信订单
|
||||
/// </summary>
|
||||
SmsOrder = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 产品订单
|
||||
/// </summary>
|
||||
Product = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 课程订单
|
||||
/// </summary>
|
||||
Course = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 课程套餐订单
|
||||
/// </summary>
|
||||
CoursePackage =3,
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// 全付通
|
||||
/// </summary>
|
||||
QuanFuTong = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 汇旺财
|
||||
/// </summary>
|
||||
WeiFuTong = 10
|
||||
}
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// 全付通
|
||||
/// </summary>
|
||||
QuanFuTong = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 汇旺财
|
||||
/// </summary>
|
||||
WeiFuTong = 10
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付方式
|
||||
/// </summary>
|
||||
public enum PaymentMethod
|
||||
{
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 微信付款码支付
|
||||
/// </summary>
|
||||
WechatSwipeCardPay = 1,
|
||||
/// <summary>
|
||||
/// 微信扫码支付
|
||||
/// </summary>
|
||||
WechatQrPay = 2,
|
||||
/// <summary>
|
||||
/// 支付宝付款码支付
|
||||
/// </summary>
|
||||
AliSwipeCardPay = 3,
|
||||
/// <summary>
|
||||
/// 支付宝扫码支付
|
||||
/// </summary>
|
||||
AliQrPay = 4,
|
||||
/// <summary>
|
||||
/// 微信公众号支付
|
||||
/// </summary>
|
||||
WechatJsAppPay = 5
|
||||
}
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付方式
|
||||
/// </summary>
|
||||
public enum PaymentMethod
|
||||
{
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 微信付款码支付
|
||||
/// </summary>
|
||||
WechatSwipeCardPay = 1,
|
||||
/// <summary>
|
||||
/// 微信扫码支付
|
||||
/// </summary>
|
||||
WechatQrPay = 2,
|
||||
/// <summary>
|
||||
/// 支付宝付款码支付
|
||||
/// </summary>
|
||||
AliSwipeCardPay = 3,
|
||||
/// <summary>
|
||||
/// 支付宝扫码支付
|
||||
/// </summary>
|
||||
AliQrPay = 4,
|
||||
/// <summary>
|
||||
/// 微信公众号支付
|
||||
/// </summary>
|
||||
WechatJsAppPay = 5
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 未支付
|
||||
/// </summary>
|
||||
NotPay = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 已支付
|
||||
/// </summary>
|
||||
OkPay = 20,
|
||||
|
||||
/// <summary>
|
||||
/// 过期
|
||||
/// </summary>
|
||||
Expire = 30,
|
||||
|
||||
/// <summary>
|
||||
/// 支付失败
|
||||
/// </summary>
|
||||
Fail = 40,
|
||||
|
||||
/// <summary>
|
||||
/// 支付成功,回调失败
|
||||
/// </summary>
|
||||
CallbackFail = 50,
|
||||
|
||||
/// <summary>
|
||||
/// 支付中
|
||||
/// </summary>
|
||||
Paying = 60
|
||||
}
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 未支付
|
||||
/// </summary>
|
||||
NotPay = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 已支付
|
||||
/// </summary>
|
||||
OkPay = 20,
|
||||
|
||||
/// <summary>
|
||||
/// 过期
|
||||
/// </summary>
|
||||
Expire = 30,
|
||||
|
||||
/// <summary>
|
||||
/// 支付失败
|
||||
/// </summary>
|
||||
Fail = 40,
|
||||
|
||||
/// <summary>
|
||||
/// 支付成功,回调失败
|
||||
/// </summary>
|
||||
CallbackFail = 50,
|
||||
|
||||
/// <summary>
|
||||
/// 支付中
|
||||
/// </summary>
|
||||
Paying = 60
|
||||
}
|
||||
}
|
||||
@@ -1,72 +1,72 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentType
|
||||
{
|
||||
/// <summary>
|
||||
/// 线下支付-现金
|
||||
/// </summary>
|
||||
[Description("线下支付-现金")] OfflinePayCash = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-支票
|
||||
/// </summary>
|
||||
[Description("线下支付-支票")] OfflinePayCheck = 20,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-银行转账
|
||||
/// </summary>
|
||||
[Description("线下支付-银行转账")] OfflinePayBank = 30,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-pos机刷卡
|
||||
/// </summary>
|
||||
[Description("线下支付-pos机刷卡")] OfflinePayPOS = 40,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-支付宝直接转账
|
||||
/// </summary>
|
||||
[Description("线下支付-支付宝直接转账")] OfflinePayAlipay = 50,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-微信直接转账
|
||||
/// </summary>
|
||||
[Description("线下支付-微信直接转账")] OfflinePayWechat = 60,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-微信支付
|
||||
/// </summary>
|
||||
[Description("线上支付-微信支付")] OnlinePayWechart = 70,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-POS机储蓄卡刷卡
|
||||
/// </summary>
|
||||
[Description("线上支付-POS机储蓄卡刷卡")] OnlinePosDeposit = 80,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-POS机信用卡刷卡
|
||||
/// </summary>
|
||||
[Description("线上支付-POS机信用卡刷卡")] OnlinePosCredit = 90,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-支付宝
|
||||
/// </summary>
|
||||
[Description("线上支付-支付宝")] OnlineAlipay = 100,
|
||||
|
||||
/// <summary>
|
||||
/// 停车劵免费
|
||||
/// </summary>
|
||||
[Description("停车劵免费")] ParkTicketFree = 110,
|
||||
|
||||
/// <summary>
|
||||
/// 余额冲抵
|
||||
/// </summary>
|
||||
[Description("余额冲抵")] BalanceOffset =120,
|
||||
|
||||
/// <summary>
|
||||
/// 其他支付方式
|
||||
/// </summary>
|
||||
[Description("其他支付方式")] Other = 250
|
||||
}
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum PaymentType
|
||||
{
|
||||
/// <summary>
|
||||
/// 线下支付-现金
|
||||
/// </summary>
|
||||
[Description("线下支付-现金")] OfflinePayCash = 10,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-支票
|
||||
/// </summary>
|
||||
[Description("线下支付-支票")] OfflinePayCheck = 20,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-银行转账
|
||||
/// </summary>
|
||||
[Description("线下支付-银行转账")] OfflinePayBank = 30,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-pos机刷卡
|
||||
/// </summary>
|
||||
[Description("线下支付-pos机刷卡")] OfflinePayPOS = 40,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-支付宝直接转账
|
||||
/// </summary>
|
||||
[Description("线下支付-支付宝直接转账")] OfflinePayAlipay = 50,
|
||||
|
||||
/// <summary>
|
||||
/// 线下支付-微信直接转账
|
||||
/// </summary>
|
||||
[Description("线下支付-微信直接转账")] OfflinePayWechat = 60,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-微信支付
|
||||
/// </summary>
|
||||
[Description("线上支付-微信支付")] OnlinePayWechart = 70,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-POS机储蓄卡刷卡
|
||||
/// </summary>
|
||||
[Description("线上支付-POS机储蓄卡刷卡")] OnlinePosDeposit = 80,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-POS机信用卡刷卡
|
||||
/// </summary>
|
||||
[Description("线上支付-POS机信用卡刷卡")] OnlinePosCredit = 90,
|
||||
|
||||
/// <summary>
|
||||
/// 线上支付-支付宝
|
||||
/// </summary>
|
||||
[Description("线上支付-支付宝")] OnlineAlipay = 100,
|
||||
|
||||
/// <summary>
|
||||
/// 停车劵免费
|
||||
/// </summary>
|
||||
[Description("停车劵免费")] ParkTicketFree = 110,
|
||||
|
||||
/// <summary>
|
||||
/// 余额冲抵
|
||||
/// </summary>
|
||||
[Description("余额冲抵")] BalanceOffset =120,
|
||||
|
||||
/// <summary>
|
||||
/// 其他支付方式
|
||||
/// </summary>
|
||||
[Description("其他支付方式")] Other = 250
|
||||
}
|
||||
}
|
||||
@@ -1,156 +1,156 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum ResultCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 未知错误
|
||||
/// </summary>
|
||||
[Description("服务正在更新中,请稍后再试")] C_UNKNOWN_ERROR = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 成功
|
||||
/// </summary>
|
||||
[Description("成功")] C_SUCCESS = 10000,
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
[Description("验证码错误")] C_VERIFY_CODE_ERROR = 10001,
|
||||
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
[Description("服务正在更新中,请稍后再试")] C_PARAM_ERROR = 10002,
|
||||
|
||||
/// <summary>
|
||||
/// 登录名
|
||||
/// </summary>
|
||||
[Description("登录名错误")] C_LONGIN_NAME_ERROR = 10003,
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Description("密码错误")] C_PASSWORD_ERROR = 10004,
|
||||
|
||||
/// <summary>
|
||||
/// 无效操作
|
||||
/// </summary>
|
||||
[Description("非法操作")] C_INVALID_ERROR = 10005,
|
||||
|
||||
/// <summary>
|
||||
/// 文件
|
||||
/// </summary>
|
||||
[Description("文件错误")] C_FILE_ERROR = 10006,
|
||||
|
||||
/// <summary>
|
||||
/// 已存在错误
|
||||
/// </summary>
|
||||
[Description("资源已存在错误")] C_ALREADY_EXISTS_ERROR = 10007,
|
||||
|
||||
/// <summary>
|
||||
/// 资源无法访问:不是资源的拥有者
|
||||
/// </summary>
|
||||
[Description("不是资源的拥有者,资源无法访问")] C_OWNER_ERROR = 10008,
|
||||
|
||||
/// <summary>
|
||||
/// 资源不存在
|
||||
/// </summary>
|
||||
[Description("资源不存在")] C_NOT_EXISTS_ERROR = 10009,
|
||||
|
||||
/// <summary>
|
||||
/// 新建角色出错
|
||||
/// </summary>
|
||||
[Description("创建角色出错")] C_ROLE_CREATE_ERROR = 10010,
|
||||
|
||||
/// <summary>
|
||||
/// 新建权限出错
|
||||
/// </summary>
|
||||
[Description("新建权限错误")] C_PERMISSION_CREATE_ERROR = 10011,
|
||||
|
||||
/// <summary>
|
||||
/// 绑定角色和权限出错
|
||||
/// </summary>
|
||||
[Description("绑定角色和权限出错")] C_ROLE_PERMISSION_CREATE_ERROR = 10012,
|
||||
|
||||
/// <summary>
|
||||
/// 服务器繁忙,请稍后再试!
|
||||
/// </summary>
|
||||
[Description("服务器繁忙")] C_Server_Is_Busy = 10013,
|
||||
|
||||
/// <summary>
|
||||
/// 访问被禁止
|
||||
/// </summary>
|
||||
[Description("禁止访问")] C_Access_Forbidden = 10014,
|
||||
|
||||
/// <summary>
|
||||
/// 非法操作
|
||||
/// </summary>
|
||||
[Description("非法操作")] C_Illegal_Operation = 10015,
|
||||
|
||||
/// <summary>
|
||||
/// 无效的openID
|
||||
/// </summary>
|
||||
[Description("OpenID无效")] C_OPENID_ERROR = 10016,
|
||||
|
||||
/// <summary>
|
||||
/// 返回错误,但无需理会
|
||||
/// </summary>
|
||||
[Description("可忽略的错误")] C_IGNORE_ERROR = 10017,
|
||||
|
||||
/// <summary>
|
||||
/// 用户信息错误
|
||||
/// </summary>
|
||||
[Description("用户信息错误")] C_USERINFO_ERROR = 10018,
|
||||
|
||||
/// <summary>
|
||||
/// 用户需要认证
|
||||
/// </summary>
|
||||
[Description("用户需要认证")] C_USER_SELECT_ERROR = 10019,
|
||||
|
||||
/// <summary>
|
||||
/// 过期
|
||||
/// </summary>
|
||||
[Description("超时错误")] C_TIMEOUT_ERROR = 10020,
|
||||
|
||||
/// <summary>
|
||||
/// 手机和验证码不匹配
|
||||
/// </summary>
|
||||
[Description("手机和验证码不匹配")] C_PHONE_CODE_ERROR = 10021,
|
||||
|
||||
/// <summary>
|
||||
/// 微信没有选择楼
|
||||
/// </summary>
|
||||
[Description("微信没有选择楼")] C_WX_UNIT_UNSELECT_ERROR = 10022,
|
||||
|
||||
/// <summary>
|
||||
/// 黑名单错误
|
||||
/// </summary>
|
||||
[Description("黑名单错误")] C_BLACKLIST_ERROR = 10023,
|
||||
|
||||
/// <summary>
|
||||
/// 支付失败
|
||||
/// </summary>
|
||||
[Description("支付失败")] C_PAY_FAIL = 10024,
|
||||
|
||||
/// <summary>
|
||||
/// 重定向
|
||||
/// </summary>
|
||||
[Description("重定向")] C_REDIRECT_URL = 100302,
|
||||
|
||||
[Description("用户重定向")] C_USER_REDIRECT_URL = 900302,
|
||||
|
||||
|
||||
[Description("人脸已经存在")] C_FACEKEY_EXIST_ERROR = 900303,
|
||||
|
||||
[Description("人脸角度不正确")] C_FACE_ANGLE_ERROR = 900304,
|
||||
|
||||
[Description("退款失败")] C_PAY_Refund = 900305,
|
||||
|
||||
/// <summary>
|
||||
/// 用户支付中
|
||||
/// </summary>
|
||||
[Description("用户支付中")] C_USERPAYING = 900306
|
||||
}
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Hncore.Payment.Enum
|
||||
{
|
||||
public enum ResultCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 未知错误
|
||||
/// </summary>
|
||||
[Description("服务正在更新中,请稍后再试")] C_UNKNOWN_ERROR = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 成功
|
||||
/// </summary>
|
||||
[Description("成功")] C_SUCCESS = 10000,
|
||||
|
||||
/// <summary>
|
||||
/// 验证码
|
||||
/// </summary>
|
||||
[Description("验证码错误")] C_VERIFY_CODE_ERROR = 10001,
|
||||
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
[Description("服务正在更新中,请稍后再试")] C_PARAM_ERROR = 10002,
|
||||
|
||||
/// <summary>
|
||||
/// 登录名
|
||||
/// </summary>
|
||||
[Description("登录名错误")] C_LONGIN_NAME_ERROR = 10003,
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[Description("密码错误")] C_PASSWORD_ERROR = 10004,
|
||||
|
||||
/// <summary>
|
||||
/// 无效操作
|
||||
/// </summary>
|
||||
[Description("非法操作")] C_INVALID_ERROR = 10005,
|
||||
|
||||
/// <summary>
|
||||
/// 文件
|
||||
/// </summary>
|
||||
[Description("文件错误")] C_FILE_ERROR = 10006,
|
||||
|
||||
/// <summary>
|
||||
/// 已存在错误
|
||||
/// </summary>
|
||||
[Description("资源已存在错误")] C_ALREADY_EXISTS_ERROR = 10007,
|
||||
|
||||
/// <summary>
|
||||
/// 资源无法访问:不是资源的拥有者
|
||||
/// </summary>
|
||||
[Description("不是资源的拥有者,资源无法访问")] C_OWNER_ERROR = 10008,
|
||||
|
||||
/// <summary>
|
||||
/// 资源不存在
|
||||
/// </summary>
|
||||
[Description("资源不存在")] C_NOT_EXISTS_ERROR = 10009,
|
||||
|
||||
/// <summary>
|
||||
/// 新建角色出错
|
||||
/// </summary>
|
||||
[Description("创建角色出错")] C_ROLE_CREATE_ERROR = 10010,
|
||||
|
||||
/// <summary>
|
||||
/// 新建权限出错
|
||||
/// </summary>
|
||||
[Description("新建权限错误")] C_PERMISSION_CREATE_ERROR = 10011,
|
||||
|
||||
/// <summary>
|
||||
/// 绑定角色和权限出错
|
||||
/// </summary>
|
||||
[Description("绑定角色和权限出错")] C_ROLE_PERMISSION_CREATE_ERROR = 10012,
|
||||
|
||||
/// <summary>
|
||||
/// 服务器繁忙,请稍后再试!
|
||||
/// </summary>
|
||||
[Description("服务器繁忙")] C_Server_Is_Busy = 10013,
|
||||
|
||||
/// <summary>
|
||||
/// 访问被禁止
|
||||
/// </summary>
|
||||
[Description("禁止访问")] C_Access_Forbidden = 10014,
|
||||
|
||||
/// <summary>
|
||||
/// 非法操作
|
||||
/// </summary>
|
||||
[Description("非法操作")] C_Illegal_Operation = 10015,
|
||||
|
||||
/// <summary>
|
||||
/// 无效的openID
|
||||
/// </summary>
|
||||
[Description("OpenID无效")] C_OPENID_ERROR = 10016,
|
||||
|
||||
/// <summary>
|
||||
/// 返回错误,但无需理会
|
||||
/// </summary>
|
||||
[Description("可忽略的错误")] C_IGNORE_ERROR = 10017,
|
||||
|
||||
/// <summary>
|
||||
/// 用户信息错误
|
||||
/// </summary>
|
||||
[Description("用户信息错误")] C_USERINFO_ERROR = 10018,
|
||||
|
||||
/// <summary>
|
||||
/// 用户需要认证
|
||||
/// </summary>
|
||||
[Description("用户需要认证")] C_USER_SELECT_ERROR = 10019,
|
||||
|
||||
/// <summary>
|
||||
/// 过期
|
||||
/// </summary>
|
||||
[Description("超时错误")] C_TIMEOUT_ERROR = 10020,
|
||||
|
||||
/// <summary>
|
||||
/// 手机和验证码不匹配
|
||||
/// </summary>
|
||||
[Description("手机和验证码不匹配")] C_PHONE_CODE_ERROR = 10021,
|
||||
|
||||
/// <summary>
|
||||
/// 微信没有选择楼
|
||||
/// </summary>
|
||||
[Description("微信没有选择楼")] C_WX_UNIT_UNSELECT_ERROR = 10022,
|
||||
|
||||
/// <summary>
|
||||
/// 黑名单错误
|
||||
/// </summary>
|
||||
[Description("黑名单错误")] C_BLACKLIST_ERROR = 10023,
|
||||
|
||||
/// <summary>
|
||||
/// 支付失败
|
||||
/// </summary>
|
||||
[Description("支付失败")] C_PAY_FAIL = 10024,
|
||||
|
||||
/// <summary>
|
||||
/// 重定向
|
||||
/// </summary>
|
||||
[Description("重定向")] C_REDIRECT_URL = 100302,
|
||||
|
||||
[Description("用户重定向")] C_USER_REDIRECT_URL = 900302,
|
||||
|
||||
|
||||
[Description("人脸已经存在")] C_FACEKEY_EXIST_ERROR = 900303,
|
||||
|
||||
[Description("人脸角度不正确")] C_FACE_ANGLE_ERROR = 900304,
|
||||
|
||||
[Description("退款失败")] C_PAY_Refund = 900305,
|
||||
|
||||
/// <summary>
|
||||
/// 用户支付中
|
||||
/// </summary>
|
||||
[Description("用户支付中")] C_USERPAYING = 900306
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace PaymentCenterClient
|
||||
{
|
||||
public static class IServiceCollectionExtension
|
||||
{
|
||||
public static void AddPaymentCenterClient(this IServiceCollection service, string baseUrl = "")
|
||||
{
|
||||
if (!baseUrl.Has())
|
||||
{
|
||||
baseUrl = "http://paymentcenter/";
|
||||
}
|
||||
|
||||
PaymentCenterHttpClient._BaseUrl = baseUrl;
|
||||
|
||||
service.AddHttpClient();
|
||||
service.AddSingleton<PaymentCenterHttpClient>();
|
||||
}
|
||||
}
|
||||
using Hncore.Infrastructure.Extension;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace PaymentCenterClient
|
||||
{
|
||||
public static class IServiceCollectionExtension
|
||||
{
|
||||
public static void AddPaymentCenterClient(this IServiceCollection service, string baseUrl = "")
|
||||
{
|
||||
if (!baseUrl.Has())
|
||||
{
|
||||
baseUrl = "http://paymentcenter/";
|
||||
}
|
||||
|
||||
PaymentCenterHttpClient._BaseUrl = baseUrl;
|
||||
|
||||
service.AddHttpClient();
|
||||
service.AddSingleton<PaymentCenterHttpClient>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Hncore.Infrastructure\Hncore.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Hncore.Infrastructure\Hncore.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
using System.Net.Http;
|
||||
|
||||
namespace PaymentCenterClient
|
||||
{
|
||||
public class PaymentCenterHttpClient
|
||||
{
|
||||
private IHttpClientFactory _httpClientFactory;
|
||||
|
||||
internal static string _BaseUrl = "";
|
||||
|
||||
public PaymentCenterHttpClient(){}
|
||||
|
||||
public PaymentCenterHttpClient(IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_httpClientFactory = httpClientFactory;
|
||||
}
|
||||
|
||||
public string BaseUrl => _BaseUrl;
|
||||
|
||||
public HttpClient CreateHttpClient()
|
||||
{
|
||||
return _httpClientFactory.CreateClient("PaymentCenterClient");
|
||||
}
|
||||
}
|
||||
using System.Net.Http;
|
||||
|
||||
namespace PaymentCenterClient
|
||||
{
|
||||
public class PaymentCenterHttpClient
|
||||
{
|
||||
private IHttpClientFactory _httpClientFactory;
|
||||
|
||||
internal static string _BaseUrl = "";
|
||||
|
||||
public PaymentCenterHttpClient(){}
|
||||
|
||||
public PaymentCenterHttpClient(IHttpClientFactory httpClientFactory)
|
||||
{
|
||||
_httpClientFactory = httpClientFactory;
|
||||
}
|
||||
|
||||
public string BaseUrl => _BaseUrl;
|
||||
|
||||
public HttpClient CreateHttpClient()
|
||||
{
|
||||
return _httpClientFactory.CreateClient("PaymentCenterClient");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class CreateOffLinePaySuccessedRecordRequest: PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 总金额,单位:分
|
||||
/// </summary>
|
||||
public int TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型
|
||||
/// </summary>
|
||||
public PaymentType PaymentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付方式
|
||||
/// </summary>
|
||||
public PaymentMethod PaymentMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务订单号
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单类型
|
||||
/// </summary>
|
||||
public OrderType OrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否来自POS机
|
||||
/// </summary>
|
||||
public bool FromPos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回调地址
|
||||
/// </summary>
|
||||
public string CallbackUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务方附加信息,回调时原样返回
|
||||
/// </summary>
|
||||
public string Attach { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付成功后要发送的mqtt消息
|
||||
/// </summary>
|
||||
public List<MqttMessage> MqttMessages { get; set; } = new List<MqttMessage>();
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class CreateOffLinePaySuccessedRecordRequest: PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 总金额,单位:分
|
||||
/// </summary>
|
||||
public int TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型
|
||||
/// </summary>
|
||||
public PaymentType PaymentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付方式
|
||||
/// </summary>
|
||||
public PaymentMethod PaymentMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务订单号
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单类型
|
||||
/// </summary>
|
||||
public OrderType OrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否来自POS机
|
||||
/// </summary>
|
||||
public bool FromPos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回调地址
|
||||
/// </summary>
|
||||
public string CallbackUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务方附加信息,回调时原样返回
|
||||
/// </summary>
|
||||
public string Attach { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付成功后要发送的mqtt消息
|
||||
/// </summary>
|
||||
public List<MqttMessage> MqttMessages { get; set; } = new List<MqttMessage>();
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,37 @@
|
||||
using Hncore.Payment.Enum;
|
||||
using System.Collections.Generic;
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class CreateOrderRequestBase: PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 业务方附加信息,回调时原样返回
|
||||
/// </summary>
|
||||
public string Attach { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总金额,单位:分
|
||||
/// </summary>
|
||||
public int TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型
|
||||
/// </summary>
|
||||
public PaymentType PaymentType { get; set; } = PaymentType.OnlinePayWechart;
|
||||
|
||||
/// <summary>
|
||||
/// 回调地址
|
||||
/// </summary>
|
||||
public string CallbackUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务订单号
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
}
|
||||
using Hncore.Payment.Enum;
|
||||
using System.Collections.Generic;
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class CreateOrderRequestBase: PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 业务方附加信息,回调时原样返回
|
||||
/// </summary>
|
||||
public string Attach { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总金额,单位:分
|
||||
/// </summary>
|
||||
public int TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型
|
||||
/// </summary>
|
||||
public PaymentType PaymentType { get; set; } = PaymentType.OnlinePayWechart;
|
||||
|
||||
/// <summary>
|
||||
/// 回调地址
|
||||
/// </summary>
|
||||
public string CallbackUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品描述
|
||||
/// </summary>
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务订单号
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// POS机推送订单请求
|
||||
/// </summary>
|
||||
public class EPayCreateOrderRequest : CreateOrderRequestBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// POS机推送订单请求
|
||||
/// </summary>
|
||||
public class EPayCreateOrderRequest : CreateOrderRequestBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class MqttMessage
|
||||
{
|
||||
public string Topic { get; set; }
|
||||
|
||||
public string Payload { get; set; }
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class MqttMessage
|
||||
{
|
||||
public string Topic { get; set; }
|
||||
|
||||
public string Payload { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class PaymentRequestBase
|
||||
{
|
||||
public int TenantId { get; set; }
|
||||
|
||||
public int StoreId { get; set; } = 0;
|
||||
|
||||
}
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
public class PaymentRequestBase
|
||||
{
|
||||
public int TenantId { get; set; }
|
||||
|
||||
public int StoreId { get; set; } = 0;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付请求
|
||||
/// </summary>
|
||||
public class QrPayCreateOrderRequest: CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标平台,微信、支付宝
|
||||
/// </summary>
|
||||
public TargetPlatform TargetPlatform { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 目标平台,微信、支付宝
|
||||
/// </summary>
|
||||
public enum TargetPlatform
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信
|
||||
/// </summary>
|
||||
Wechat=1,
|
||||
/// <summary>
|
||||
/// 支付宝
|
||||
/// </summary>
|
||||
Alipay=2
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付请求
|
||||
/// </summary>
|
||||
public class QrPayCreateOrderRequest: CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标平台,微信、支付宝
|
||||
/// </summary>
|
||||
public TargetPlatform TargetPlatform { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 目标平台,微信、支付宝
|
||||
/// </summary>
|
||||
public enum TargetPlatform
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信
|
||||
/// </summary>
|
||||
Wechat=1,
|
||||
/// <summary>
|
||||
/// 支付宝
|
||||
/// </summary>
|
||||
Alipay=2
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 单笔代付请求
|
||||
/// </summary>
|
||||
public class SingleDaiFuRequest : PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单Id
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收款人姓名
|
||||
/// </summary>
|
||||
public string AccName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收款人账号
|
||||
/// </summary>
|
||||
public string AccNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转账金额,单位:分
|
||||
/// </summary>
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用途
|
||||
/// </summary>
|
||||
public string Purpose { get; set; }
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 单笔代付请求
|
||||
/// </summary>
|
||||
public class SingleDaiFuRequest : PaymentRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单Id
|
||||
/// </summary>
|
||||
public string OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收款人姓名
|
||||
/// </summary>
|
||||
public string AccName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收款人账号
|
||||
/// </summary>
|
||||
public string AccNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转账金额,单位:分
|
||||
/// </summary>
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用途
|
||||
/// </summary>
|
||||
public string Purpose { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 刷卡支付请求
|
||||
/// </summary>
|
||||
public class SwipeCardCreateOrderRequest : CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付授权码, 设备读取用户展示的条码或者二维码信息
|
||||
/// </summary>
|
||||
public string AuthCode { get; set; }
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 刷卡支付请求
|
||||
/// </summary>
|
||||
public class SwipeCardCreateOrderRequest : CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 扫码支付授权码, 设备读取用户展示的条码或者二维码信息
|
||||
/// </summary>
|
||||
public string AuthCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,40 +1,40 @@
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序、公众号支付请求
|
||||
/// </summary>
|
||||
public class WechatJsPayCreateOrderRequest: CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付环境
|
||||
/// </summary>
|
||||
public PayEnvironment PayEnvironment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微信用户关注商家公众号的openid
|
||||
/// </summary>
|
||||
public string UserOpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公众账号或小程序ID
|
||||
/// </summary>
|
||||
public string AppId { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 支付环境
|
||||
/// </summary>
|
||||
public enum PayEnvironment
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序支付
|
||||
/// </summary>
|
||||
WeApp=1,
|
||||
/// <summary>
|
||||
/// 公众号支付
|
||||
/// </summary>
|
||||
H5=2
|
||||
}
|
||||
namespace Hncore.Payment.Request
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信小程序、公众号支付请求
|
||||
/// </summary>
|
||||
public class WechatJsPayCreateOrderRequest: CreateOrderRequestBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付环境
|
||||
/// </summary>
|
||||
public PayEnvironment PayEnvironment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微信用户关注商家公众号的openid
|
||||
/// </summary>
|
||||
public string UserOpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 公众账号或小程序ID
|
||||
/// </summary>
|
||||
public string AppId { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 支付环境
|
||||
/// </summary>
|
||||
public enum PayEnvironment
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序支付
|
||||
/// </summary>
|
||||
WeApp=1,
|
||||
/// <summary>
|
||||
/// 公众号支付
|
||||
/// </summary>
|
||||
H5=2
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class QrPayCreateOrderResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 商户可用此参数自定义去生成二维码后展示出来进行扫码支付
|
||||
/// </summary>
|
||||
public string CodeUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 此参数的值即是根据code_url生成的可以扫码支付的二维码图片地址
|
||||
/// </summary>
|
||||
public string CodeImgUrl { get; set; }
|
||||
}
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class QrPayCreateOrderResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 商户可用此参数自定义去生成二维码后展示出来进行扫码支付
|
||||
/// </summary>
|
||||
public string CodeUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 此参数的值即是根据code_url生成的可以扫码支付的二维码图片地址
|
||||
/// </summary>
|
||||
public string CodeImgUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class QueryOrderResponse
|
||||
{
|
||||
public PaymentStatus PaymentStatus { get; set; }
|
||||
public PaymentType PayType { get; set; }
|
||||
public string PaymentMessage { get; set; }
|
||||
}
|
||||
using Hncore.Payment.Enum;
|
||||
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class QueryOrderResponse
|
||||
{
|
||||
public PaymentStatus PaymentStatus { get; set; }
|
||||
public PaymentType PayType { get; set; }
|
||||
public string PaymentMessage { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class WechatJsPayCreateOrderResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 原生态js支付信息或小程序支付信息
|
||||
/// </summary>
|
||||
public string PayInfo { get; set; }
|
||||
}
|
||||
namespace Hncore.Payment.Response
|
||||
{
|
||||
public class WechatJsPayCreateOrderResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 原生态js支付信息或小程序支付信息
|
||||
/// </summary>
|
||||
public string PayInfo { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user