public Guid ResetCartGuid(Guid userGuid) { var value = Guid.NewGuid(); _cartSessionManager.SetSessionValue(CartManager.CurrentCartGuid, userGuid, value); return(value); }
public TransactionRegistrationResponse RegisterTransaction(CartModel model) { var tryCount = 0; while (tryCount++ < 5) { var transactionRegistrationResponse = _transactionManager.Register(model); if (transactionRegistrationResponse.Status == ResponseType.Ok) { _cartSessionManager.SetSessionValue(SagePayEnrolledResponseKey, _getUserGuid.UserGuid, transactionRegistrationResponse, SessionDataTimeoutDefaults.PaymentInfo); return(transactionRegistrationResponse); } model.CartGuid = _cartGuidResetter.ResetCartGuid(_getUserGuid.UserGuid); } return(new TransactionRegistrationResponse { Status = ResponseType.Error }); }
public void SetDate(DateTime date) { _cartSessionManager.SetSessionValue(CartManager.CurrentShippingDateKey, _getUserGuid.UserGuid, date.Date); }
public void SetOrderAmount(decimal total) { _cartSessionManager.SetSessionValue(CurrentPaypointOrderAmount, _getUserGuid.UserGuid, total, SessionDataTimeoutDefaults.PaymentInfo); }
public void SetShippingAddress(Address address, Guid?userGuid = null) { _cartSessionManager.SetSessionValue(CurrentShippingAddressKey, userGuid ?? _getUserGuid.UserGuid, address); }
public void SetUseRewardPoints(bool useRewardPoints) { _cartSessionManager.SetSessionValue(AssignRewardPointInfo.UseRewardPoints, _getUserGuid.UserGuid, useRewardPoints); }
public void Save(string message) { _cartSessionManager.SetSessionValue(CartManager.CurrentGiftMessageKey, _getUserGuid.UserGuid, message); }
public void SaveDiscounts(HashSet <string> codes) { _cartSessionManager.SetSessionValue(CurrentDiscountCodesKey, _getUserGuid.UserGuid, codes); }
public void SetAcceptance(bool accept) { _cartSessionManager.SetSessionValue(CartManager.TermsAndConditionsAcceptedKey, _getUserGuid.UserGuid, accept); }
public void SetModel(PaypointPaymentDetailsModel model) { _cartSessionManager.SetSessionValue(PaypointPaymentModelKey, _getUserGuid.UserGuid, model, SessionDataTimeoutDefaults.PaymentInfo, true); }