tijian_tieying/web/dccdc/Common/Config.cs

120 lines
4.2 KiB
C#
Raw Normal View History

2025-02-20 12:14:39 +08:00
using System;
using System.Collections.Generic;
using System.Web;
namespace WxPayAPI
{
/**
*
*/
public class WxPayConfig
{
//=======【基本信息设置】=====================================
/*
* APPIDAPPID
* MCHID
* KEY
* APPSECRETsecertJSAPI支付的时候需要配置
*/
public static string APPID{
get
{
return dccdc.Common.Global.AppId;
}
}
public static string MCHID
{
get
{
var hc = HttpContext.Current;
if (hc.Application["MCHID"] != null) return (string)hc.Application["MCHID"];
var mchid = new dccdc.BLL.Common().getParm_Value("MCHID", "1319968401", "MCHID");
hc.Application["MCHID"] = mchid;
return mchid;
}
}
public static string KEY
{
get
{
var hc = HttpContext.Current;
if (hc.Application["WXPayKEY"] != null) return (string) hc.Application["WXPayKEY"];
var key = new dccdc.BLL.Common().getParm_Value("WXPayKEY", "32481440f2fac994106475dc96082534", "WXPayKEY");
hc.Application["WXPayKEY"] = key;
return key;
}
}
public static string APPSECRET
{
get
{
return dccdc.Common.Global.Appsecret;
}
}
//=======【证书路径设置】=====================================
/* ,退
*/
public const string SSLCERT_PATH = "cert/apiclient_cert.p12";
public const string SSLCERT_PASSWORD = "1420142002";
//=======【支付结果通知url】=====================================
/* url
*/
public static string NOTIFY_URL
{
get
{
var hc = HttpContext.Current;
if (hc.Application["NOTIFY_URL"] != null) return (string) hc.Application["NOTIFY_URL"];
var notify_url = new dccdc.BLL.Common().getParm_Value("NOTIFY_URL", "http://dc.51csharp.com/dccdc/WeiXin/notify", "NOTIFY_URL");
hc.Application["NOTIFY_URL"] = notify_url;
return notify_url;
}
}
/// <summary>
/// 接收费用支付的通知结果
/// </summary>
public static string NOTIFY_URL_Charge
{
get
{
var hc = HttpContext.Current;
if (hc.Application["NOTIFY_URL_Charge"] != null) return (string)hc.Application["NOTIFY_URL_Charge"];
var notify_url = new dccdc.BLL.Common().getParm_Value("NOTIFY_URL_Charge", "http://dc.51csharp.com/dccdc/WeiXin/notify_Charge", "支付收费通知URL");
hc.Application["NOTIFY_URL_Charge"] = notify_url;
return notify_url;
}
}
//=======【商户系统后台机器IP】=====================================
/*
*/
public const string IP = "8.8.8.8";
//=======【代理服务器设置】===================================
/* IP和端口号分别为0.0.0.00
*/
public const string PROXY_URL = "http://10.152.18.220:8080";
//=======【上报信息配置】===================================
/* 0.; 1.; 2.
*/
public const int REPORT_LEVENL = 1;
//=======【日志级别】===================================
/* 0.1.; 2.; 3.
*/
public const int LOG_LEVENL = 3;
}
}