WxPayConfig.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Utils;
  5. namespace WxPayAPI
  6. {
  7. /**
  8. * 配置账号信息
  9. */
  10. public class WxPayConfig
  11. {
  12. //=======【基本信息设置】=====================================
  13. /* 微信公众号信息配置
  14. * APPID:绑定支付的APPID(必须配置)
  15. * MCHID:商户号(必须配置)
  16. * KEY:商户支付密钥,参考开户邮件设置(必须配置)
  17. * APPSECRET:公众帐号secert(仅JSAPI支付的时候需要配置)
  18. */
  19. public static string APPID = AppSettingsHelper.Configuration["WxPay:APPID"] ?? "wx9d90c8092775b35a";
  20. public static string MCHID = AppSettingsHelper.Configuration["WxPay:MCHID"] ?? "";
  21. public static string KEY = AppSettingsHelper.Configuration["WxPay:KEY"] ?? "";
  22. public static string APPSECRET = AppSettingsHelper.Configuration["WxPay:APPSECRET"] ?? "7f40e071886104b4ea01538db4402e1a";
  23. //=======【证书路径设置】=====================================
  24. /* 证书路径,注意应该填写绝对路径(仅退款、撤销订单时需要)
  25. */
  26. public static string SSLCERT_PATH = AppSettingsHelper.Configuration["WxPay:SSLCERT_PATH"] ?? "D:\\cert\\apiclient_cert.p12";
  27. public const string SSLCERT_PASSWORD = "1623130594";
  28. //=======【支付结果通知url】=====================================
  29. /* 支付结果通知回调url,用于商户接收支付结果
  30. */
  31. public static string NOTIFY_URL = AppSettingsHelper.Configuration["WxPay:NOTIFY_URL"] ?? "";
  32. //=======【商户系统后台机器IP】=====================================
  33. /* 此参数可手动配置也可在程序中自动获取
  34. */
  35. public const string IP = "8.8.8.8";
  36. //=======【代理服务器设置】===================================
  37. /* 默认IP和端口号分别为0.0.0.0和0,此时不开启代理(如有需要才设置)
  38. */
  39. public const string PROXY_URL = "http://10.152.18.220:8080";
  40. //=======【上报信息配置】===================================
  41. /* 测速上报等级,0.关闭上报; 1.仅错误时上报; 2.全量上报
  42. */
  43. public const int REPORT_LEVENL = 1;
  44. //=======【日志级别】===================================
  45. /* 日志等级,0.不输出日志;1.只输出错误信息; 2.输出错误和正常信息; 3.输出错误信息、正常信息和调试信息
  46. */
  47. public const int LOG_LEVENL = 3;
  48. }
  49. }