65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace WebService.SDK.UnionPay
|
||
{
|
||
public class UnionPayConfig
|
||
{
|
||
/// <summary>
|
||
/// 银联支付平台API主地址
|
||
/// </summary>
|
||
private string UnionPayURL { get; }
|
||
|
||
/// <summary>
|
||
/// 接口版本
|
||
/// </summary>
|
||
public string Version { get; } = "2.0";
|
||
|
||
/// <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 UnionPayAPIURL => UnionPayURL + "/pay/gateway";
|
||
|
||
/// <summary>
|
||
/// 银联支付平台API参数初始化
|
||
/// </summary>
|
||
/// <param name="platformAPPID">银联支付平台APPID</param>
|
||
/// <param name="platformKey">银联支付平台签名Key</param>
|
||
/// <param name="organization">银联支付平台机构号</param>
|
||
/// <param name="unionPayURL">银联支付平台API主地址</param>
|
||
/// <param name="platformTimeout">平台API连接超时时间(秒)</param>
|
||
public UnionPayConfig(string platformAPPID, string platformKey, string organization,
|
||
string unionPayURL = "https://qra.95516.com", int platformTimeout = 5)
|
||
{
|
||
PlatformAPPID = platformAPPID;
|
||
PlatformKey = platformKey;
|
||
Organization = organization;
|
||
UnionPayURL = unionPayURL;
|
||
PlatformTimeout = platformTimeout;
|
||
}
|
||
}
|
||
}
|