コード例 #1
0
        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);
        }
コード例 #2
0
        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/"));
        }
コード例 #3
0
 public PurchaseRequestHandler(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings) : base(payRequest, settings)
 {
 }
コード例 #4
0
 protected RequestHandler(IMerchantPayRequest payRequest, AppSettings.ProcessRequestSettings settings)
 {
     MerchantPayRequest = payRequest;
     Settings           = settings;
 }