public void PlaceOrder() { _productsInCart = new List <Product> { new Product("Laptop", "HP", 1, 50000.0f), new Product("Mouse", "Logitech", 1, 500.0f), new Product("Dock Station", "HP", 1, 650.0f), new Product("Head Phone", "Sony", 1, 400.0f) }; _payment = new PaymentGateway("Citi Bank", 123456789); _invoice = new BillInvoice(_productsInCart); _payment.TotalAmount = _productsInCart.Sum(prod => prod.Quantity * prod.Price); _payment.PayOnline(); _invoice.PrintInvoice(); }
public void PlaceOrder() { _productsInCart = new List<Product> { new Product("Laptop", "HP", 1, 50000.0f), new Product("Mouse", "Logitech", 1, 500.0f), new Product("Dock Station", "HP", 1, 650.0f), new Product("Head Phone", "Sony", 1, 400.0f) }; _payment = new PaymentGateway("Citi Bank", 123456789); _invoice = new BillInvoice(_productsInCart); _payment.TotalAmount = _productsInCart.Sum(prod => prod.Quantity*prod.Price); _payment.PayOnline(); _invoice.PrintInvoice(); }