public static class PaymentStrategyFactory | |
{ | |
public static IPaymentStrategy Create(string paymentProvider) | |
{ | |
switch (paymentProvider) | |
{ | |
case "Paypal": return new PaypalPaymentStrategy(); | |
case "ApplePay": return new ApplePayPaymentStrategy(); | |
default: return NullPaymentStrategy.Instance; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment