public WeixinService(AppLogger logger, HttpClient client, IOptions <WxOptions> wxOptions, IDistributedCache cache) { _logger = logger; _client = client; _cache = cache; _wxOptions = wxOptions.Value; }
public WeixinWithdrawRefund(HttpClient client, AppLogger logger, IOptions <WxOptions> options) { _client = client; _logger = logger; _options = options.Value; //var clientHandler = new HttpClientHandler { // AllowAutoRedirect = true, // AutomaticDecompression = DecompressionMethods.GZip, // ClientCertificateOptions = ClientCertificateOption.Manual, // //ServerCertificateCustomValidationCallback = delegate { return true; } //}; //var cert = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, _options.WxApiCert); //X509Certificate2 x509Certificate2 = new X509Certificate2(cert, _options.WxMchId); //clientHandler.ClientCertificates.Add(x509Certificate2); //_client = new HttpClient(clientHandler); }
public WxSettings Base() { var _settings = new WxOptions(_WxSettings); return(_settings.Value); }
public WeixinPay(HttpClient client, AppLogger logger, IOptions <WxOptions> options) { _client = client; _logger = logger; _options = options.Value; }
internal static void Init(HttpClient client, IMemoryCache cache, WxOptions option) { _client = client; MemoryCache = cache; WxOption = option; }
public WxService(IOptions <WxOptions> options, HttpClient client, IMemoryCache cache) { _options = options.Value; WxClient.Init(client, cache, _options); }