Esempio n. 1
0
 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}");
     }
 }
Esempio n. 2
0
 public ProductRepository(IAccessClient client = null)
 {
     MyClient = client;
 }
Esempio n. 3
0
 public ShoppingRepository(IAccessClient client = null)
 {
     MyClient = client;
 }
Esempio n. 4
0
 public ApplicationRepository(IAccessClient client)
 {
     MyClient = client;
 }
Esempio n. 5
0
 public Client(HttpClient httpClient)
 {
     Topics = new TopicsClient(httpClient);
     Access = new AccessClient(httpClient);
 }