Esempio n. 1
0
 public void FinalizeOrder(OrderDetails details)
 {
     inventory.Update(details.ProductNo);
     costing.ApplyDiscounts(details.Price, details.DiscountPercent);
     logistic.ShipProduct(details.ProductName, details.AddressLine1);
     orderVerify.VerifyShippingAddress(details.PinCode);
     payment.ProcessPayment(details.CardNo, details.Price);
 }
Esempio n. 2
0
 /// <summary>
 /// making the order
 /// </summary>
 /// <param name="orderDetails"></param>
 public void FinalizeOrder(OrderDetails orderDetails)
 {
     inventory.Update(orderDetails.ProductNo);
     orderVerify.VerifyShippingAddress(orderDetails.PinCode);
     orderDetails.Price = costManger.ApplyDiscounts(orderDetails.Price, orderDetails.DiscountPercent);
     paymentGateWay.VerifyCardDetails(orderDetails.CardNo);
     paymentGateWay.ProcessPayment(orderDetails.CardNo, orderDetails.Price);
     logistics.ShipProduct(orderDetails.ProductName, string.Format($"{orderDetails.AddressLine1}, {orderDetails.AddressLine2} - {orderDetails.PinCode}."));
 }
        public bool Update(Order order)
        {
            if (_paymentGateWay.VerifyCardDetails(order))
            {
                _costManger.ApplyDiscounts(order);
                _paymentGateWay.ProcessPayment(order);
                return(InternalUpdate(order));
            }

            return(false);
        }