82 lines
2.5 KiB
C#
82 lines
2.5 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace WebService.SDK.ALLinPay
|
||
{
|
||
public class ALLinPayConfig
|
||
{
|
||
/// <summary>
|
||
/// 通联支付平台API主地址
|
||
/// </summary>
|
||
private string ALLinPayURL { get; }
|
||
|
||
/// <summary>
|
||
/// 支付平台连接超时时间
|
||
/// 单位:秒
|
||
/// </summary>
|
||
public int PlatformTimeout { get; }
|
||
|
||
/// <summary>
|
||
/// 通联支付平台APPID
|
||
/// </summary>
|
||
public string PlatformAPPID { get; }
|
||
|
||
/// <summary>
|
||
/// 通联支付平台签名Key
|
||
/// </summary>
|
||
public string PlatformKey { get; }
|
||
|
||
/// <summary>
|
||
/// 通联支付平台机构号
|
||
/// </summary>
|
||
public string Organization { get; }
|
||
|
||
/// <summary>
|
||
/// 统一条码付API地址
|
||
/// </summary>
|
||
public string ScanPayURL => ALLinPayURL + "/apiweb/unitorder/scanqrpay";
|
||
|
||
/// <summary>
|
||
/// 统一支付API地址
|
||
/// 二维码支付,JS支付,小程序支付
|
||
/// </summary>
|
||
public string PayURL => ALLinPayURL + "/apiweb/unitorder/pay";
|
||
|
||
/// <summary>
|
||
/// H5、APP支付API地址
|
||
/// </summary>
|
||
public string H5PayURL => ALLinPayURL + "/apiweb/unitorder/h5pay";
|
||
|
||
/// <summary>
|
||
/// 支付查询API地址
|
||
/// </summary>
|
||
public string QueryURL => ALLinPayURL + "/apiweb/unitorder/query";
|
||
|
||
/// <summary>
|
||
/// 退款API地址
|
||
/// </summary>
|
||
public string RefundURL => ALLinPayURL + "/apiweb/unitorder/refund";
|
||
|
||
|
||
/// <summary>
|
||
/// 通联支付平台API参数初始化
|
||
/// </summary>
|
||
/// <param name="platformAPPID">通联支付平台APPID</param>
|
||
/// <param name="platformKey">通联支付平台签名Key</param>
|
||
/// <param name="organization">通联支付平台机构号</param>
|
||
/// <param name="allinPayURL">通联支付平台API主地址</param>
|
||
/// <param name="platformTimeout">平台API连接超时时间(秒)</param>
|
||
public ALLinPayConfig(string platformAPPID, string platformKey, string organization,
|
||
string allinPayURL = "https://vsp.allinpay.com", int platformTimeout = 5)
|
||
{
|
||
PlatformAPPID = platformAPPID;
|
||
PlatformKey = platformKey;
|
||
Organization = organization;
|
||
ALLinPayURL = allinPayURL;
|
||
PlatformTimeout = platformTimeout;
|
||
}
|
||
}
|
||
}
|