Exemplo n.º 1
0
        public virtual CheckoutStore GetClient(IMarket market)
        {
            if (PaymentMethodDto != null)
            {
                var connectionConfiguration = GetCheckoutConfiguration(market);

                string userAgent = $"Platform/Episerver.Commerce_{typeof(EPiServer.Commerce.ApplicationContext).Assembly.GetName().Version} Module/Klarna.Checkout_{typeof(KlarnaCheckoutService).Assembly.GetName().Version}";

                _client = new CheckoutStore(new ApiSession
                {
                    ApiUrl      = connectionConfiguration.ApiUrl,
                    UserAgent   = userAgent,
                    Credentials = new ApiCredentials
                    {
                        Username = connectionConfiguration.Username,
                        Password = connectionConfiguration.Password
                    }
                }, new JsonSerializer());
            }
            return(_client);
        }
Exemplo n.º 2
0
 public LoggingCheckoutOrder(CheckoutStore client)
 {
     _client = client;
 }