WxPay.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Security.Cryptography.X509Certificates;
  4. using System.Text;
  5. namespace Gateway.Payment.Shared
  6. {
  7. public class WxPayConfig
  8. {
  9. //=======【基本信息设置】=====================================
  10. /* 微信公众号信息配置
  11. * APPID:绑定支付的APPID(必须配置)
  12. * SUBAPPID: 子商户的APPID
  13. * MCHID:商户号(必须配置)
  14. * SUBMCHID:子商户号
  15. * KEY:商户支付密钥,参考开户邮件设置(必须配置)
  16. * APPSECRET:公众帐号secert(仅JSAPI支付的时候需要配置)
  17. */
  18. public string APPID { get; set; }
  19. public string SUBAPPID { get; set; }
  20. public string MCHID { get; set; }
  21. public string SUBMCHID { get; set; }
  22. public string KEY { get; set; }
  23. public string APPSECRET { get; set; }
  24. //=======【证书设置】=====================================
  25. /* 证书文件名(仅退款、撤销订单时需要)
  26. */
  27. public string SSLCERT { get; set; }
  28. public string SSLCERT_PASSWORD { get; set; }
  29. //=======【支付结果通知url】=====================================
  30. /* 支付结果通知回调url,用于商户接收支付结果
  31. */
  32. public string NOTIFY_URL { get; set; }
  33. //=======【商户系统后台机器IP】=====================================
  34. /* 此参数可手动配置也可在程序中自动获取
  35. */
  36. public string IP { get; set; }
  37. //=======【代理服务器设置】===================================
  38. /* 默认IP和端口号分别为0.0.0.0和0,此时不开启代理(如有需要才设置)
  39. */
  40. public string PROXY_URL { get; set; }
  41. //=======【上报信息配置】===================================
  42. /* 测速上报等级,0.关闭上报; 1.仅错误时上报; 2.全量上报
  43. */
  44. public int REPORT_LEVENL { get; set; }
  45. public string MINI_PROGRAM_APPID { get; set; }
  46. }
  47. public class WxPayConfigInfo
  48. {
  49. public WxPayConfig Config { get; set; }
  50. public string HashValue { get; set; }
  51. }
  52. public class WxPayCertificationInfo
  53. {
  54. public X509Certificate2 Certification { get; set; }
  55. public string HashValue { get; set; }
  56. }
  57. public class WxPayConfigAndCertification
  58. {
  59. public WxPayConfigInfo ConfigInfo { get; set; }
  60. public WxPayCertificationInfo CertificationInfo { get; set; }
  61. }
  62. }