public void TestInitialize() { _paymentService = new PaymentGatewayService(); _paymentInfo = new PaymentInfo { CreditCard = new CreditCard { CardNumber = "1234", Month = "01", Year = "1999", CVV = "123" }, Address = new Address { Name = "Doug Crockford", Address1 = "123 Main St.", City = "Minneapolis", State = "MN", ZipCode = "12345", Country = "USA" } }; }
private IPaymentGatewayService GetGatewayService(Card card) { IPaymentGatewayService PaymentGatewayService = null; string cardbranc = card.CardBrand; CardTypeEnum cardType = (CardTypeEnum)card.CardType; if (cardType == CardTypeEnum.Credit) { PaymentGatewayService = BankFactory.GetPaymentGateway(BankFactory.BANCO_X); } return(PaymentGatewayService); }
public MonerisPaymentProcessor(ILocalizationService localizationService, IPaymentService paymentService, ISettingService settingService, IWebHelper webHelper, IPaymentGatewayService paymentGatewayService, MonerisPaymentSettings manualPaymentSettings) { _localizationService = localizationService; _paymentService = paymentService; _settingService = settingService; _webHelper = webHelper; _monerisPaymentSettings = manualPaymentSettings; _paymentGatewayService = paymentGatewayService; }
public static bool ProcessPayment(Order order, PaymentInfo paymentInfo, IPaymentGatewayService paymentGateway) { if (order != null && order.Product != null) { PaymentStatus paymentStatus; if (paymentGateway.ProcessPayment(paymentInfo, out paymentStatus)) { IEnumerable <IPaymentAction> actions = PaymentActionFactory.Get(order.Product.ProductType); foreach (var action in actions) { action.PerformAction(order, paymentStatus); } } } return(true); }
public PaymentsController(ILogger <PaymentsController> logger, IPaymentGatewayService paymentService) { _logger = logger; _paymentService = paymentService; }
public ProcessOrderOperation(IPaymentGatewayService paymentGatewayService) { this.paymentGatewayService = paymentGatewayService; }
public PaymentController(IPaymentGatewayService paymentGatewaySer) { this.paymentGatewayService = paymentGatewaySer; }
public PaymentGatewayController(IPaymentGatewayService paymentsService) { this.paymentGatewayService = paymentsService; }
static OrderManager() { paymentGateway = new ThirdPartyPaymentGatewayService(); }
public PaymentGatewayController(IPaymentGatewayService PaymentGatewayService) { _PaymentGatewayService = PaymentGatewayService; }
public PaymentGatewayController(IPaymentGatewayService paymentGatewayService) { _paymentGatewayService = paymentGatewayService; }
public void SetUp() { _bankClient = Substitute.For <IBankClient>(); _service = new PaymentGatewayService(_bankClient, _validator, _logger); }
public PaymentGatewayController(IPaymentGatewayService paymentGatewayService, IPaymentValidator paymentValidator, ILogger logger) { _paymentGatewayService = paymentGatewayService; _paymentValidator = paymentValidator; _logger = logger; }
public PaymentGatewayFunction(IPaymentGatewayService paymentGatewayService, ILoggerFactory loggerFactory) { _paymentGatewayService = paymentGatewayService; _logger = loggerFactory.CreateLogger("PaymentGatewayFunction"); }
public PaymentGatewayController(IPaymentGatewayService paymentGatewayService, ILogger <PaymentGatewayController> logger) { this._paymentGatewayService = paymentGatewayService; this._logger = logger; }