protected BaseAutomatedPayoutProcessor( ILoggerFactory logger, StoreRepository storeRepository, PayoutProcessorData payoutProcesserSettings, ApplicationDbContextFactory applicationDbContextFactory, BTCPayNetworkProvider btcPayNetworkProvider) : base(logger.CreateLogger($"{payoutProcesserSettings.Processor}:{payoutProcesserSettings.StoreId}:{payoutProcesserSettings.PaymentMethod}")) { _storeRepository = storeRepository; _PayoutProcesserSettings = payoutProcesserSettings; PaymentMethodId = _PayoutProcesserSettings.GetPaymentMethodId(); _applicationDbContextFactory = applicationDbContextFactory; _btcPayNetworkProvider = btcPayNetworkProvider; }
public LightningAutomatedPayoutProcessor( BTCPayNetworkJsonSerializerSettings btcPayNetworkJsonSerializerSettings, LightningClientFactoryService lightningClientFactoryService, IEnumerable <IPayoutHandler> payoutHandlers, UserService userService, ILoggerFactory logger, IOptions <LightningNetworkOptions> options, StoreRepository storeRepository, PayoutProcessorData payoutProcesserSettings, ApplicationDbContextFactory applicationDbContextFactory, BTCPayNetworkProvider btcPayNetworkProvider) : base(logger, storeRepository, payoutProcesserSettings, applicationDbContextFactory, btcPayNetworkProvider) { _btcPayNetworkJsonSerializerSettings = btcPayNetworkJsonSerializerSettings; _lightningClientFactoryService = lightningClientFactoryService; _userService = userService; _options = options; _payoutHandler = (LightningLikePayoutHandler)payoutHandlers.FindPayoutHandler(PaymentMethodId); _network = _btcPayNetworkProvider.GetNetwork <BTCPayNetwork>(_PayoutProcesserSettings.GetPaymentMethodId().CryptoCode); }
public OnChainAutomatedPayoutProcessor( ApplicationDbContextFactory applicationDbContextFactory, ExplorerClientProvider explorerClientProvider, BTCPayWalletProvider btcPayWalletProvider, BTCPayNetworkJsonSerializerSettings btcPayNetworkJsonSerializerSettings, ILoggerFactory logger, BitcoinLikePayoutHandler bitcoinLikePayoutHandler, EventAggregator eventAggregator, StoreRepository storeRepository, PayoutProcessorData payoutProcesserSettings, BTCPayNetworkProvider btcPayNetworkProvider) : base(logger, storeRepository, payoutProcesserSettings, applicationDbContextFactory, btcPayNetworkProvider) { _explorerClientProvider = explorerClientProvider; _btcPayWalletProvider = btcPayWalletProvider; _btcPayNetworkJsonSerializerSettings = btcPayNetworkJsonSerializerSettings; _bitcoinLikePayoutHandler = bitcoinLikePayoutHandler; _eventAggregator = eventAggregator; }
public static T GetBlob(PayoutProcessorData data) { return(InvoiceRepository.FromBytes <T>(data.Blob)); }