Exemple #1
0
 public bool Execute()
 {
     if (_gateway.IsGatewayAvaibale())
     {
         return(_gateway.MakePayment(_amount));
     }
     return(false);
 }
Exemple #2
0
 public bool Execute()
 {
     // In real implementation make request to expensivePaymentGateway
     if (_expensiveGateWay.IsGatewayAvaibale())
     {
         return(_expensiveGateWay.MakePayment(_amount));
     }
     if (_cheapGateWay.IsGatewayAvaibale())
     {
         return(_cheapGateWay.MakePayment(_amount));
     }
     return(false);
 }