Example #1
0
        public SpotOrder(PaymentDetails paymentDetails, Cart _cart)
        {
            this._cart = _cart;

            _paymentDetails = paymentDetails;

            _paymentProcessor = new IPaymentProcessor();
        }
Example #2
0
        public OnlineOrder(PaymentDetails paymentDetails, Cart _cart)
        {
            this._cart = _cart;

            _paymentDetails = paymentDetails;

            _paymentProcessor = new IPaymentProcessor();

            _notificationService = new INotificationservice();

            _reservationService = new IReservationService();
        }
Example #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("E-Commerce Application Implemented following Single Responsibility Priniple!!!");
            Cart           _cart           = new Cart();
            PaymentDetails _paymentDetails = new PaymentDetails(9078653421, "Kanimozhi", "Platinum", 555);
            OnlineOrder    onlineOrder     = new OnlineOrder(_paymentDetails, _cart);

            onlineOrder.checkout();

            SpotOrder spotOrder = new SpotOrder(_paymentDetails, _cart);

            spotOrder.checkout();
        }
Example #4
0
 public void ProcessCreditCard(PaymentDetails _paymentDetails, Cart _cart)
 {
     _paymentDetails.GetPaymentDetails();
     Console.WriteLine("Payment Successfull");
 }