/// <summary> /// Initializes a new instance of the <see cref="PayfortRequestProcessor"/> class. /// </summary> /// <param name="payfortService">The payfort service.</param> /// <param name="logger">The logger.</param> /// <exception cref="ArgumentNullException"> /// payfortService /// or /// _logger /// </exception> public PayfortRequestProcessor(IPayfortClient payfortService, ILogger <PayfortRequestProcessor> logger, IGatewaySettingRepository gatewaySettingRepository, IPayfortRequestParser payfortRequestParser, IPayfortResponseParser payfortResponseParser) { _payfortService = payfortService ?? throw new ArgumentNullException(nameof(payfortService)); _logger = logger ?? throw new ArgumentNullException(nameof(_logger)); _gatewaySettingRepository = gatewaySettingRepository ?? throw new ArgumentNullException(nameof(gatewaySettingRepository)); _payfortRequestParser = payfortRequestParser ?? throw new ArgumentNullException(nameof(payfortRequestParser)); _payfortResponseParser = payfortResponseParser ?? throw new ArgumentNullException(nameof(payfortResponseParser)); }
/// <summary> /// Initializes a new instance of the <see cref="PayfortRequestParser"/> class. /// </summary> /// <param name="gatewaySettingRepository">The gateway setting repository.</param> /// <exception cref="ArgumentNullException">gatewaySettingRepository</exception> public PayfortRequestParser(IGatewaySettingRepository gatewaySettingRepository) { _gatewaySettingRepository = gatewaySettingRepository ?? throw new ArgumentNullException(nameof(gatewaySettingRepository)); PayfortConfigurationModel = _gatewaySettingRepository.GetPayfortConfiguration(); }