public void PreparePayment(Invoice invoice) { PaymentGatewayFactory factory = new PaymentGatewayFactory(); this.gateway = factory.CreatePaymentGateway(invoice); this.gateway.PaymentGranularity(invoice); }
public void MakePayment(PaymentMethod method, Product product) { PaymentGatewayFactory factory = new PaymentGatewayFactory(); gateway = factory.CreatePaymentGateway(method, product); gateway.MakePayment(product); }