2025-03-28 09:49:56 +08:00

75 lines
2.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WebService.SDK.KwyPay
{
public class KwyPayConfig
{
/// <summary>
/// 客无忧支付平台API主地址
/// </summary>
private string KwyPayURL { get; }
/// <summary>
/// 支付平台连接超时时间
/// 单位:秒
/// </summary>
public int PlatformTimeout { get; }
/// <summary>
/// 客无忧支付平台APPID/OPENID
/// </summary>
public string PlatformAPPID { get; }
/// <summary>
/// 客无忧支付平台签名Key
/// </summary>
public string PlatformKey { get; }
/// <summary>
/// 客无忧支付平台机构号
/// </summary>
public string Organization { get; }
/// <summary>
/// 统一条码付API地址
/// </summary>
public string MicroPayURL => KwyPayURL + "/Payapi/Index/microPay";
/// <summary>
/// H5、APP、公众号跳转支付API地址
/// </summary>
public string WebPayURL => KwyPayURL + "/Payapi/Index/Webpay";
/// <summary>
/// 支付查询API地址
/// </summary>
public string OrderQueryURL => KwyPayURL + "/Payapi/Index/orderQuery";
/// <summary>
/// 退款API地址
/// </summary>
public string RefundPrice => KwyPayURL + "/Payapi/Index/refundPrice";
/// <summary>
///客无忧支付平台API参数初始化
/// </summary>
/// <param name="platformAPPID">客无忧支付平台APPID</param>
/// <param name="platformKey">客无忧支付平台签名Key</param>
/// <param name="organization">客无忧支付平台机构号</param>
/// <param name="kwyPayURL">客无忧支付平台API主地址</param>
/// <param name="platformTimeout">平台API连接超时时间</param>
public KwyPayConfig(string platformAPPID, string platformKey, string organization,
string kwyPayURL = "https://apisvbak2.ke51.cn", int platformTimeout = 5)
{
PlatformAPPID = platformAPPID;
PlatformKey = platformKey;
Organization = organization;
KwyPayURL = kwyPayURL;
PlatformTimeout = platformTimeout;
}
}
}