public SpotOrder(PaymentDetails paymentDetails, Cart _cart) { this._cart = _cart; _paymentDetails = paymentDetails; _paymentProcessor = new IPaymentProcessor(); }
public OnlineOrder(PaymentDetails paymentDetails, Cart _cart) { this._cart = _cart; _paymentDetails = paymentDetails; _paymentProcessor = new IPaymentProcessor(); _notificationService = new INotificationservice(); _reservationService = new IReservationService(); }
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(); }
public void ProcessCreditCard(PaymentDetails _paymentDetails, Cart _cart) { _paymentDetails.GetPaymentDetails(); Console.WriteLine("Payment Successfull"); }