public void purchase()
 {
     repositories.Cart cart = new repositories.Cart();
     foreach (var product in this._params.elements)
     {
         cart.Put(product, product.GetCartCount());
     }
     fiscal = new services.Fiscal(new drivers.FiscalAbstractFabric(), cart);
     fiscal.Register(this._params.payment_type, Properties.Settings.Default.comment);
 }
 public void purchase()
 {
     repositories.Cart cart = new repositories.Cart();
     if (this._params.discount > 0)
     {
         entities.Discount discount = new entities.Discount(1, "disc", this._params.discount);
         discount.SetType(this._params.discount_type);
         cart.SetDiscount(discount);
     }
     foreach (var product in this._params.elements)
     {
         cart.Put(product, product.CartCount);
     }
     Properties.Settings.Default.taxType = this._params.tax_id;
     fiscal = new services.Fiscal(new drivers.FiscalAbstractFabric(), cart);
     fiscal.SetTax(this._params.tax_id);
     fiscal.Register(this._params.payment_type);
 }