public ServiceBusListener(IConfiguration configuration, ILoggerFactory loggerFactory, IExternalGatewayPaymentService externalGatewayPaymentService, IMessageBus messageBus)
        {
            logger = loggerFactory.CreateLogger <ServiceBusListener>();
            orderPaymentUpdatedMessageTopic = configuration.GetValue <string>("OrderPaymentUpdatedMessageTopic");

            this.configuration = configuration;
            this.externalGatewayPaymentService = externalGatewayPaymentService;
            this.messageBus = messageBus;
        }
        public PaymentMessageWorker(ILogger <PaymentMessageWorker> logger,
                                    IConfiguration configuration, IExternalGatewayPaymentService externalGatewayPaymentService, IMessageBus messageBus) : base(logger, configuration)
        {
            try
            {
                this.externalGatewayPaymentService = externalGatewayPaymentService;
                this.messageBus = messageBus;

                base.QueueName      = configuration["RabbitMQ:OrderPaymentRequestMessageQueue"];
                _publishToQueueName = configuration["RabbitMQ:OrderPaymentUpdatedMessageQueue"];

                _logger = logger;
            }
            catch (Exception e)
            {
                _logger.LogError(e, e.Message);
            }
        }
 public OrderPaymentRequestCommandHandler(IExternalGatewayPaymentService externalGatewayPaymentService)
 {
     _externalGatewayPaymentService = externalGatewayPaymentService;
 }