83 lines
2.7 KiB
C#
83 lines
2.7 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace WebService.SDK.CCBPay
|
||
{
|
||
public class CCBPayConfig
|
||
{
|
||
/// <summary>
|
||
/// 建设银行支付平台API主地址
|
||
/// </summary>
|
||
private string CCBPayURL { get; }
|
||
|
||
/// <summary>
|
||
/// 建设银行退款交易接口地址
|
||
/// </summary>
|
||
private string CCBRefundURL { 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>
|
||
/// 被扫支付接口地址
|
||
/// </summary>
|
||
public string ScanURL => CCBPayURL + "/CCBIS/B2CMainPlat_00_ENPAY";
|
||
|
||
/// <summary>
|
||
/// 交易查询接口地址
|
||
/// </summary>
|
||
public string QueryURL => CCBPayURL + "/CCBIS/B2CMainPlat_00_ENPAY";
|
||
|
||
/// <summary>
|
||
/// 交易撤销接口地址
|
||
/// </summary>
|
||
public string PayRefundURL => CCBRefundURL+ "/CCBWeb/refund.jsp";
|
||
|
||
/// <summary>
|
||
/// 交易撤销查询接口地址
|
||
/// </summary>
|
||
public string PayQueryRefundURL => CCBRefundURL+ "/CCBWeb/refund.jsp";
|
||
|
||
/// <summary>
|
||
/// 建设银行支付平台API参数初始化
|
||
/// </summary>
|
||
/// <param name="platformAPPID">建设银行支付平台APPID</param>
|
||
/// <param name="platformKey">建设银行支付平台签名Key</param>
|
||
/// <param name="organization">建设银行支付平台分行号</param>
|
||
/// <param name="ccbPayURL">建设银行支付平台API主地址</param>
|
||
/// <param name="ccbRefundURL">建设银行退款API地址</param>
|
||
/// <param name="platformTimeout">平台API连接超时时间(秒)</param>
|
||
public CCBPayConfig(string platformAPPID, string platformKey, string organization,
|
||
string ccbPayURL = "https://ibsbjstar.ccb.com.cn",
|
||
string ccbRefundURL = "http://183.129.232.107:13080", int platformTimeout = 5)
|
||
{
|
||
PlatformAPPID = platformAPPID;
|
||
PlatformKey = platformKey;
|
||
Organization = organization;
|
||
CCBPayURL = ccbPayURL;
|
||
CCBRefundURL = ccbRefundURL;
|
||
PlatformTimeout = platformTimeout;
|
||
}
|
||
}
|
||
}
|