Exemple #1
0
 public MerchantController(IErrorLogService _errorLogService, IMerchantService MerchantService, IKycService kycService, IMerchantUserService merchantUserService)
 {
     this._MerchantService     = MerchantService;
     this._kycService          = kycService;
     this._MerchantUserService = merchantUserService;
     this.errorLogService      = _errorLogService;
 }
 public MerchantsController(
     [NotNull] IMerchantService merchantService,
     [NotNull] ILogFactory logFactory)
 {
     _merchantService = merchantService ?? throw new ArgumentNullException(nameof(merchantService));
     _log             = logFactory.CreateLog(this);
 }
Exemple #3
0
 public MerchantController(IUnitOfWork unitOfWork, IConfiguration config, IMapper mapper, IMerchantService merchantService)
 {
     _unitOfWork      = unitOfWork;
     _config          = config;
     _mapper          = mapper;
     _merchantService = merchantService;
 }
Exemple #4
0
        private async Task InitializeUserToContext(HttpContext context, IMerchantService merchantService, string token)
        {
            try
            {
                var tokenHandler = new JwtSecurityTokenHandler();
                var key          = Encoding.ASCII.GetBytes(_appSettings.JwtKey);
                tokenHandler.ValidateToken(token, new TokenValidationParameters
                {
                    ValidateIssuerSigningKey = true,
                    IssuerSigningKey         = new SymmetricSecurityKey(key),
                    ValidateIssuer           = false,
                    ValidateAudience         = false,
                    // set clockskew to zero so tokens expire exactly at token expiration time (instead of 5 minutes later)
                    ClockSkew = TimeSpan.Zero
                }, out SecurityToken validatedToken);

                var jwtToken   = (JwtSecurityToken)validatedToken;
                var merchantId = jwtToken.Claims.First(x => x.Type == "merchantId").Value.ToString();
                var apiKey     = jwtToken.Claims.First(x => x.Type == "apiKey").Value.ToString();

                // attach user to context on successful jwt validation
                context.Items["User"] = await merchantService.GetMerchant(merchantId, apiKey);
            }
            catch
            {
                throw new SecurityTokenExpiredException();
            }
        }
Exemple #5
0
 public MerchantContractController(IMerchantService merchantService, IAuthorizationService authorizationService, IMerchantContractService merchantContractService, IUnitOfWork unitOfWork)
 {
     _merchantService         = merchantService;
     _authorizationService    = authorizationService;
     _merchantContractService = merchantContractService;
     _unitOfWork = unitOfWork;
 }
        public MerchantMasterController(

            IMerchantService MerchantService
            )
        {
            this.MerchantService = MerchantService;
        }
        public MerchantDetailController(

            IMerchantService MerchantService
            )
        {
            this.MerchantService = MerchantService;
        }
Exemple #8
0
 public CreatePaymentAPIController(ILogger <CreatePaymentAPIController> logger, IPaymentService IPaymentService, IMerchantService IMerchantService, IConfiguration configuration)
 {
     _configuration    = configuration;
     _logger           = logger;
     _IPaymentService  = IPaymentService;
     _IMerchantService = IMerchantService;
 }
 public PaymentController(IPaymentService paySvc, IUserService usrSvc, IMerchantService merSvc, INotificationService nSvc)
 {
     paymentService      = paySvc;
     userService         = usrSvc;
     merchantService     = merSvc;
     notificationService = nSvc;
 }
 public AccountsController(IUserService userService, IMerchantService merchantService, INotificationService notificationSvc, IUserSessionService usrSession)
 {
     this.userService         = userService;
     this.merchantService     = merchantService;
     this.notificationService = notificationSvc;
     this.userSessionService  = usrSession;
 }
Exemple #11
0
 public MerchantController(ICustomerService customerService, IMerchantService merchantServie,
                           IProductServices productServices, IOrderProcessingService orderProcessingService)
 {
     _customerService        = customerService;
     _merchantServie         = merchantServie;
     _productServices        = productServices;
     _orderProcessingService = orderProcessingService;
 }
 public HomeController(ICategoryService categoryService, IMerchantService merchantServie, 
     IProductServices productServices, ISearchSerivce serviceSerivce)
 {
     _categoryService = categoryService;
     _merchantServie = merchantServie;
     _productServie = productServices;
     _searchSerivce = serviceSerivce;
 }
 public ShopController(ICategoryService categoryService, IMerchantService merchantServie, IProductServices productServices,
                       IPromotionService promotionService)
 {
     _categoryService  = categoryService;
     _merchantServie   = merchantServie;
     _productServices  = productServices;
     _promotionService = promotionService;
 }
Exemple #14
0
 public HomeController(ICategoryService categoryService, IMerchantService merchantServie,
                       IProductServices productServices, ISearchSerivce serviceSerivce)
 {
     _categoryService = categoryService;
     _merchantServie  = merchantServie;
     _productServie   = productServices;
     _searchSerivce   = serviceSerivce;
 }
 public ShopController(ICategoryService categoryService, IMerchantService merchantServie, IProductServices productServices,
     IPromotionService promotionService)
 {
     _categoryService = categoryService;
     _merchantServie = merchantServie;
     _productServices = productServices;
     _promotionService = promotionService;
 }
 public ProfileController(ApplicationUserManager userManager, ICustomerService customerService, 
     IMerchantService merchantServie, ICustomerOrderService customerOrderService)
 {
     _customerService = customerService;
     _merchantServie = merchantServie;
     _customerOrderService = customerOrderService;
     UserManager = userManager;
 }
Exemple #17
0
 public EmployeeDepartmentController(IEmployeeDepartmentService iEmployeeDepartmentService,
                                     IEmployeeService iEmployeeService,
                                     IMerchantService iMerchantService)
 {
     this.iEmployeeDepartmentService = iEmployeeDepartmentService;
     this.iEmployeeService           = iEmployeeService;
     this.iMerchantService           = iMerchantService;
 }
 public TransactionsController(ICurrencyService currencyService, ICardDetailsService cardDetailsService, IMerchantService merchantService, ITransactionService transactionService, IBankService bankService)
 {
     _currencyService    = currencyService;
     _cardDetailsService = cardDetailsService;
     _merchantService    = merchantService;
     _transactionService = transactionService;
     _bankService        = bankService;
 }
Exemple #19
0
 public OrderHousePaymentController(IOrderHousePaymentService iOrderHousePaymentService,
                                    IEmployeeService iEmployeeService,
                                    IMerchantService iMerchantService)
 {
     this.iOrderHousePaymentService = iOrderHousePaymentService;
     this.iMerchantService          = iMerchantService;
     this.iEmployeeService          = iEmployeeService;
 }
Exemple #20
0
 public MerchantAuditWeChatMsgBehavior(
     IOrchardServices os,
     IMerchantService merchant,
     ISMSHelper smsHelper) : base(os)
 {
     this.Merchant  = merchant;
     this.SMSHelper = smsHelper;
 }
 public CatalogsController(IAnchorService anchorService, IMerchantService merchantService, ISupplierService supplierService, ICatalogService catalogService, IOptions <AppConfig> appConfig)
 {
     _appConfig       = appConfig;
     _catalogService  = catalogService;
     _merchantService = merchantService;
     _supplierService = supplierService;
     _anchorService   = anchorService;
 }
Exemple #22
0
 public HomeController(IUserService iUserService,
                       IMenuService iMenuService,
                       IMerchantService iMerchantService)
 {
     this.iUserService     = iUserService;
     this.iMenuService     = iMenuService;
     this.iMerchantService = iMerchantService;
 }
 public ProfileController(ApplicationUserManager userManager, ICustomerService customerService,
                          IMerchantService merchantServie, ICustomerOrderService customerOrderService)
 {
     _customerService      = customerService;
     _merchantServie       = merchantServie;
     _customerOrderService = customerOrderService;
     UserManager           = userManager;
 }
 public MerchantController(ICustomerService customerService, IMerchantService merchantServie, 
     IProductServices productServices, IOrderProcessingService orderProcessingService)
 {
     _customerService = customerService;
     _merchantServie = merchantServie;
     _productServices = productServices;
     _orderProcessingService = orderProcessingService;
 }
Exemple #25
0
 public DeliveryController(IAuthorizationService authorizationService, IInvoiceDetailService invoiceDetailService, IMerchantService merchantService, IDeliveryService deliveryService, IUnitOfWork unitOfWork)
 {
     _authorizationService = authorizationService;
     _merchantService      = merchantService;
     _deliveryService      = deliveryService;
     _invoiceDetailService = invoiceDetailService;
     _unitOfWork           = unitOfWork;
 }
 public TLTPreferencesController(ITLTPreferencesService iTLTPreferencesService,
                                 IEmployeeService iEmployeeService,
                                 IMerchantService iMerchantService)
 {
     this.iTLTPreferencesService = iTLTPreferencesService;
     this.iEmployeeService       = iEmployeeService;
     this.iMerchantService       = iMerchantService;
 }
 public VolatilitySettingsController(
     [NotNull] IVolatilitySettingsService volatilitySettingsService,
     [NotNull] ILogFactory logFactory,
     [NotNull] IMerchantService merchantService)
 {
     _merchantService           = merchantService ?? throw new ArgumentNullException(nameof(merchantService));
     _volatilitySettingsService = volatilitySettingsService ?? throw new ArgumentNullException(nameof(volatilitySettingsService));
     _log = logFactory.CreateLog(this);
 }
Exemple #28
0
        public MerchantAddressMasterController(

            IMerchantService MerchantService,
            IMerchantAddressService MerchantAddressService
            )
        {
            this.MerchantService        = MerchantService;
            this.MerchantAddressService = MerchantAddressService;
        }
 public VoucherService(ApplicationDbContext context, IAzureStorageService azureStorageService,
                       IConfiguration configuration, IMailService mailService, IMerchantService merchantService)
 {
     _context             = context;
     _azureStorageService = azureStorageService;
     _configuration       = configuration;
     _mailService         = mailService;
     _merchantService     = merchantService;
 }
 //private readonly ICartService _cartService;
 public ProductController(ICategoryService categoryService, IProductServices productServices, 
     IMerchantService merchantService, IDiscountService discountService)
 {
     _categoryService = categoryService;
     _productServices = productServices;
     _merchantService = merchantService;
     _discountService = discountService;
     //_cartService = cartService;
 }
        public HomeController(IMerchantService merchantService, IPromotionService promotionService, IReadOnlyPolicyRegistry <string> policyRegistry)
        {
            this.merchantService  = merchantService;
            this.promotionService = promotionService;

            mainPromotionPolicy = policyRegistry.Get <IAsyncPolicy <Promotion> >("PromoFallback");
            sidePromotionPolicy = policyRegistry.Get <IAsyncPolicy>("Promo");
            merchantPolicy      = policyRegistry.Get <IAsyncPolicy>("Merchant");
        }
        //private readonly ICartService _cartService;

        public ProductController(ICategoryService categoryService, IProductServices productServices, 
            IMerchantService merchantService, IDiscountService discountService)
        {
            _categoryService = categoryService;
            _productServices = productServices;
            _merchantService = merchantService;
            _discountService = discountService;
            //_cartService = cartService;
        }
Exemple #33
0
        public MerchantController(IMerchantService merchantService)
        {
            this.merchantService = merchantService;

            OrderlineMappings.CreateCouponMapping();
            OrderlineMappings.CreateMerchantOrderlineMapping();
            OrderlineMappings.CreateOrderlineMapping();
            MerchantMappings.CreateMerchantInfoMapping();
        }
        public MerchantAddressDetailController(

            IMerchantService MerchantService,
            IMerchantAddressService MerchantAddressService
            )
        {
            this.MerchantService        = MerchantService;
            this.MerchantAddressService = MerchantAddressService;
        }
 public TransactionsControllerTests()
 {
     _currencyService        = new CurrencyServiceFake();
     _merchantsService       = new MerchantServiceFake();
     _transactionsService    = new TransactionServiceFake();
     _cardDetailsService     = new CardDetailsServiceFake();
     _bankService            = new BankServiceFake();
     _transactionsController = new TransactionsController(_currencyService, _cardDetailsService, _merchantsService, _transactionsService, _bankService);
 }
Exemple #36
0
        public WarehouseDetailController(

            IMerchantService MerchantService,
            IWarehouseService WarehouseService
            )
        {
            this.MerchantService  = MerchantService;
            this.WarehouseService = WarehouseService;
        }
 public AdminController(ICategoryService categoryService, ICustomerService customerService, 
     IMerchantService merchantServie, IDepartmentService departmentService,
     IOrderProcessingService orderProcessingService, IPromotionService promotionService)
 {
     _categoryService = categoryService;
     _customerService = customerService;
     _merchantServie = merchantServie;
     _departmentService = departmentService;
     _orderProcessingService = orderProcessingService;
     _promotionService = promotionService;
 }