public PushpayService(IPushpayClient pushpayClient, IDonationService donationService, IMapper mapper, IConfigurationWrapper configurationWrapper) { _pushpayClient = pushpayClient; _donationService = donationService; _mapper = mapper; _mpDonationStatusPending = configurationWrapper.GetMpConfigIntValue("CRDS-COMMON", "DonationStatusPending") ?? 1; _mpDonationStatusDeclined = configurationWrapper.GetMpConfigIntValue("CRDS-COMMON", "DonationStatusDeclined") ?? 3; _mpDonationStatusSucceeded = configurationWrapper.GetMpConfigIntValue("CRDS-COMMON", "DonationStatusSucceeded") ?? 4; }
public BatchService(IDonationRepository donationRepository, IBatchRepository batchRepository, IMapper mapper, IConfigurationWrapper configurationWrapper) { _donationRepository = donationRepository; _batchRepository = batchRepository; _mapper = mapper; _batchEntryTypeValue = configurationWrapper.GetMpConfigIntValue("CRDS-FINANCE", "BatchEntryType", true).GetValueOrDefault(); }
public DepositService(IDepositRepository depositRepository, IMapper mapper, IPushpayService pushpayService, IConfigurationWrapper configurationWrapper, IRestClient restClient = null) { _depositRepository = depositRepository; _mapper = mapper; _pushpayService = pushpayService; _restClient = restClient ?? new RestClient(); _financePath = Environment.GetEnvironmentVariable("FINANCE_PATH") ?? configurationWrapper.GetMpConfigValue("CRDS-FINANCE", "FinanceMicroservicePath", true); _depositProcessingOffset = configurationWrapper.GetMpConfigIntValue("CRDS-FINANCE", "DepositProcessingOffset", true).GetValueOrDefault(); }
public static int?GetAppMpConfigIntValue(this IConfigurationWrapper configWrapper, string key) { return(configWrapper.GetMpConfigIntValue("CRDS-FINANCE", key)); }