Beispiel #1
0
        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 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);
        }
Beispiel #3
0
 public OrderTests()
 {
     _client      = new PaymentechTestClient();
     _credentials = _client.Credentials();
 }
Beispiel #4
0
 public ProfileTests()
 {
     _client      = new PaymentechTestClient();
     _credentials = _client.Credentials;
 }