public PaymentechTestClient() { _cache = new MemoryCache(); var clientOptions = new PaymentechClientOptions { // ENTER IN CREDENTIALS HERE InterfaceVersion = "", Credentials = new Credentials { MerchantId = "", Username = "", Password = "", }, Production = false, }; InterfaceVersion = clientOptions.InterfaceVersion; Credentials = clientOptions.Credentials; Endpoint = new Endpoint(clientOptions.Production); var optionsAccessor = Options.Create(clientOptions); var loggerFactory = LoggerFactory.Create(builder => { builder.AddConsole(); }); var logger = loggerFactory.CreateLogger <PaymentechClient>(); _client = new PaymentechClient(optionsAccessor, _cache, logger); }
public PaymentechClient(IOptions <PaymentechClientOptions> optionsAccessor, IPaymentechCache cache) { _options = optionsAccessor.Value; _endpoint = new Endpoint(_options.Credentials, _options.Production); _cache = cache; }
public PaymentechTestClient() { _cache = new MemoryCache(); _clientOptions = new PaymentechClientOptions { // ENTER IN CREDENTIALS HERE InterfaceVersion = "", Credentials = new Credentials { MerchantId = "", Username = "", Password = "", }, Production = false, }; var optionsAccessor = Options.Create(_clientOptions); _client = new PaymentechClient(optionsAccessor, _cache); }
public PaymentechClient(IOptions <PaymentechClientOptions> optionsAccessor, IPaymentechCache cache, ILogger <PaymentechClient> logger) : this(optionsAccessor) { _cache = cache; _logger = logger; }
public PaymentechClient(IOptions <PaymentechClientOptions> optionsAccessor, IPaymentechCache cache) : this(optionsAccessor) { _cache = cache; }