示例#1
0
        public Guid ResetCartGuid(Guid userGuid)
        {
            var value = Guid.NewGuid();

            _cartSessionManager.SetSessionValue(CartManager.CurrentCartGuid, userGuid, value);
            return(value);
        }
示例#2
0
        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);
 }
示例#5
0
 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);
 }
示例#7
0
 public void Save(string message)
 {
     _cartSessionManager.SetSessionValue(CartManager.CurrentGiftMessageKey, _getUserGuid.UserGuid, message);
 }
示例#8
0
 public void SaveDiscounts(HashSet <string> codes)
 {
     _cartSessionManager.SetSessionValue(CurrentDiscountCodesKey, _getUserGuid.UserGuid, codes);
 }
示例#9
0
 public void SetAcceptance(bool accept)
 {
     _cartSessionManager.SetSessionValue(CartManager.TermsAndConditionsAcceptedKey, _getUserGuid.UserGuid, accept);
 }
示例#10
0
 public void SetModel(PaypointPaymentDetailsModel model)
 {
     _cartSessionManager.SetSessionValue(PaypointPaymentModelKey, _getUserGuid.UserGuid, model, SessionDataTimeoutDefaults.PaymentInfo, true);
 }