public SSLCommerzService(ISSLCommerzConfig config, ILogger <SSLCommerzService> logger) { System.Net.ServicePointManager.SecurityProtocol = Tls12; this.logger = logger; this.config = config; this.SSLCommerzBaseUrl = config.IsDevelopmentMode ? config.SSLCommerzSandboxBaseUrl : config.SSLCommerzBaseUrl; }
public SSLCommerzHttpClient(ISSLCommerzConfig config) { var httpClientHandler = new HttpClientHandler { ServerCertificateCustomValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true }; Http = new HttpClient(httpClientHandler) { BaseAddress = new Uri(config.BaseUrl) }; Http.DefaultRequestHeaders.Accept.Clear(); Http.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); }
public PaymentsController( IMapper mapper, ISSLCommerzConfig config, ICartService cartService, ISSLCommerzService sslCommerzService, ICustomerTransactionService customerTransactionService, ICustomerTransactionSessionService customerTransactionSessionService ) { _mapper = mapper; _config = config; _cartService = cartService; _sslCommerzService = sslCommerzService; _customerTransactionService = customerTransactionService; _customerTransactionSessionService = customerTransactionSessionService; }
public SSLCommerzService(SSLCommerzHttpClient httpClient, ISSLCommerzConfig config) { _httpClient = httpClient; _http = httpClient.Http; _config = config; }