public void RedirectCustomer(IAccessClient client, Basket currentBasket, HttpContext context, PaymentResponse response, string confirmedUrl) { if (response.Status == "OK") { if (!string.IsNullOrEmpty(response.RedirectUrl)) { Redirect(context, response); } else { OnOrderConfirmedNotification?.Invoke(this, new NotificationEventArgs(StormContext.BasketId.Value)); StormContext.ConfirmedBasketId = StormContext.BasketId; StormContext.BasketId = null; context.Response.Redirect(confirmedUrl, false); context.ApplicationInstance.CompleteRequest(); } } else { client.ShoppingProxy.PaymentCancel(currentBasket); throw new ApplicationException($"Fel i betalningen: {response.StatusDescription}"); } }
public ProductRepository(IAccessClient client = null) { MyClient = client; }
public ShoppingRepository(IAccessClient client = null) { MyClient = client; }
public ApplicationRepository(IAccessClient client) { MyClient = client; }
public Client(HttpClient httpClient) { Topics = new TopicsClient(httpClient); Access = new AccessClient(httpClient); }