Exemple #1
0
        static void Main(string[] args)
        {
            var paymentMachineService = new PaymentMachineService("Stone");
            var creditCardService     = new CreditCardService("Visa");

            var paymentFacade = new PaymentFacade(paymentMachineService, creditCardService);

            var response = paymentFacade.DoPayment(1000);

            Console.WriteLine(response);
            Console.ReadKey();
        }
 public PaymentFacade(PaymentMachineService paymentMachineService, CreditCardService creditCardService)
 {
     _paymentMachineService = paymentMachineService;
     _creditCardService     = creditCardService;
 }