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); }
public LoggingCheckoutOrder(CheckoutStore client) { _client = client; }