public StripeEventController(IConfigurationWrapper configuration, IStripeEventService stripeEventService = null, IMessageQueueFactory messageQueueFactory = null, IMessageFactory messageFactory = null) { var b = configuration.GetConfigValue("StripeWebhookLiveMode"); _liveMode = b != null && bool.Parse(b); b = configuration.GetConfigValue("StripeWebhookAsynchronousProcessingMode"); _asynchronous = b != null && bool.Parse(b); if (_asynchronous) { var eventQueueName = configuration.GetConfigValue("StripeWebhookEventQueueName"); _eventQueue = messageQueueFactory.CreateQueue(eventQueueName, QueueAccessMode.Send); _messageFactory = messageFactory; } else { _stripeEventService = stripeEventService; } }
public StripeEventProcessor(IStripeEventService stripeEventService) { _stripeEventService = stripeEventService; }