public PaymentServiceTests() { _paymill = new PaymillSettings { ApiAP = "", BridgeAP = "" }; _paymill.ApiKey = _paymill.PublicKey = "11921079858549680d11a1d09f9ab123"; }
public PaymentService(IOptions <PaymillSettings> settings, IHttpClient client) { _client = client; _settings = settings?.Value; if (String.IsNullOrEmpty(_settings?.ApiKey)) { throw new ArgumentException("You need to set an API key"); } _client.SetAuthHeader(_settings.ApiKey); }