WxPayConfig.cs 548 B

123456789101112131415161718192021
  1. namespace WingPaymentService.Common.WeChat
  2. {
  3. public class WxPayConfig
  4. {
  5. private static volatile IWxPayIConfig _config;
  6. private static object _syncRoot = new object();
  7. public static IWxPayIConfig GetConfig()
  8. {
  9. if (_config == null)
  10. {
  11. lock (_syncRoot)
  12. {
  13. if (_config == null)
  14. _config = new WxPayConfigData();
  15. }
  16. }
  17. return _config;
  18. }
  19. }
  20. }