76 lines
2.4 KiB
C#
76 lines
2.4 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace WebService.SDK.IRichPay
|
||
{
|
||
public class IRichPayConfig
|
||
{
|
||
/// <summary>
|
||
/// 联动优势支付平台API主地址
|
||
/// </summary>
|
||
private string IRichPayURL { get; }
|
||
|
||
/// <summary>
|
||
/// 支付平台连接超时时间
|
||
/// 单位:秒
|
||
/// </summary>
|
||
public int PlatformTimeout { get; }
|
||
|
||
/// <summary>
|
||
/// 联动优势支付平台UserCode
|
||
/// </summary>
|
||
public string PlatformAPPID { get; }
|
||
|
||
/// <summary>
|
||
/// 联动优势支付平台签名Key
|
||
/// </summary>
|
||
public string PlatformKey { get; }
|
||
|
||
/// <summary>
|
||
/// 联动优势支付平台机构号
|
||
/// </summary>
|
||
public string Organization { get; }
|
||
|
||
/// <summary>
|
||
/// 被扫支付接口地址
|
||
/// </summary>
|
||
public string BeScanURL => IRichPayURL + "?action=BeScan";
|
||
|
||
/// <summary>
|
||
/// 交易查询接口地址
|
||
/// </summary>
|
||
public string QueryURL => IRichPayURL + "?action=Query";
|
||
|
||
/// <summary>
|
||
/// 交易撤销接口地址
|
||
/// </summary>
|
||
public string PayRefundURL => IRichPayURL + "?action=PayRefund";
|
||
|
||
/// <summary>
|
||
/// 交易撤销查询接口地址
|
||
/// </summary>
|
||
public string PayQueryRefundURL => IRichPayURL + "?action=PayQueryRefund";
|
||
|
||
/// <summary>
|
||
/// 联动优势支付平台API参数初始化
|
||
/// </summary>
|
||
/// <param name="platformAPPID">联动优势支付平台UserCode</param>
|
||
/// <param name="platformKey">联动优势支付平台签名Key</param>
|
||
/// <param name="organization">联动优势支付平台机构号</param>
|
||
/// <param name="iRichPayURL">联动优势支付平台API主地址</param>
|
||
/// <param name="platformTimeout">平台API连接超时时间(秒)</param>
|
||
public IRichPayConfig(string platformAPPID, string platformKey, string organization,
|
||
string iRichPayURL = "http://h5.irichpay.com/Api/NormPay.ashx", int platformTimeout = 5)
|
||
{
|
||
PlatformAPPID = platformAPPID;
|
||
PlatformKey = platformKey;
|
||
Organization = organization;
|
||
IRichPayURL = iRichPayURL;
|
||
PlatformTimeout = platformTimeout;
|
||
}
|
||
|
||
}
|
||
}
|