public static IRequestHandler Create(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings, IBitcoinAggRepository bitcoinRepo, IMerchantPayRequestRepository merchantPayRequestRepository, IBitcoinApi bitcoinApi) { switch (payRequest.MerchantPayRequestType) { case MerchantPayRequestType.Purchase: // return new PurchaseRequestHandler(payRequest, settings); case MerchantPayRequestType.ExchangeTransfer: case MerchantPayRequestType.Transfer: return(new TransferRequestHandler(payRequest, settings, bitcoinRepo, merchantPayRequestRepository, bitcoinApi)); } return(null); }
public TransferRequestHandler(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings, IBitcoinAggRepository bitcoinRepo, IMerchantPayRequestRepository merchantPayRequestRepository, IBitcoinApi bitcoinApi) : base(payRequest, settings) { _bitcoinRepo = bitcoinRepo; _merchantPayRequestRepository = merchantPayRequestRepository; _bitcoinApi = bitcoinApi; //_bitcoinRepo = // new BitcoinAggRepository( // new AzureTableStorage<BitcoinAggEntity>( // settings.Db.MerchantWalletConnectionString, "BitcoinAgg", // null), // new AzureTableStorage<BitcoinHeightEntity>( // settings.Db.MerchantWalletConnectionString, "BitcoinHeight", // null)); //_merchantPayRequestRepository = // new MerchantPayRequestRepository( // new AzureTableStorage<MerchantPayRequest>(settings.Db.MerchantWalletConnectionString, "MerchantPayRequest", null)); //_bitcoinApi = new BitcoinApi(new Uri("http://52.164.252.39/")); }
public PurchaseRequestHandler(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings) : base(payRequest, settings) { }
protected RequestHandler(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings) { MerchantPayRequest = payRequest; Settings = settings; }