Ejemplo n.º 1
0
        public SpotOrder(PaymentDetails paymentDetails, Cart _cart)
        {
            this._cart = _cart;

            _paymentDetails = paymentDetails;

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

            _paymentDetails = paymentDetails;

            _paymentProcessor = new IPaymentProcessor();

            _notificationService = new INotificationservice();

            _reservationService = new IReservationService();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 4
0
 public void ProcessCreditCard(PaymentDetails _paymentDetails, Cart _cart)
 {
     _paymentDetails.GetPaymentDetails();
     Console.WriteLine("Payment Successfull");
 }