public GatewayHttpClient(IGatewayKeyProvider gatewayKeyProvider, HttpClientHandler?httpClientHandler = null) { httpClientHandler ??= new HttpClientHandler(); httpClientHandler.ClientCertificateOptions = ClientCertificateOption.Manual; httpClientHandler.ClientCertificates.Add(gatewayKeyProvider.AuthenticationCertificate); _httpClient = new HttpClient(httpClientHandler); _httpClient.DefaultRequestHeaders.Add(FingerprintHeader, gatewayKeyProvider.AuthenticationCertificateFingerprint); _httpClient.DefaultRequestHeaders.Add(DistinctiveNameHeader, CountryHeader); _httpClient.DefaultRequestHeaders.Add(Accept, "application / json; version = 1.0"); }
public SignatureService(IGatewayKeyProvider gatewayKeyProvider, IEncodingService encodingService) { _gatewayKeyProvider = gatewayKeyProvider; _encodingService = encodingService; }