Exemple #1
0
 public MemberController(
     IOrderService iOrderService,
     IMemberService iMemberService,
     IMemberCapitalService iMemberCapitalService,
     ICouponService iCouponService,
     IShopBonusService iShopBonusService,
     IVShopService iVShopService,
     IProductService iProductService,
     IShippingAddressService iShippingAddressService,
     IMessageService iMessageService,
     IDistributionService iDistributionService,
     IMemberSignInService iMemberSignInService,
     IRefundService iRefundService,
     ICommentService iCommentService
     )
 {
     _iOrderService           = iOrderService;
     _iMemberService          = iMemberService;
     _iMemberCapitalService   = iMemberCapitalService;
     _iCouponService          = iCouponService;
     _iShopBonusService       = iShopBonusService;
     _iVShopService           = iVShopService;
     _iProductService         = iProductService;
     _iShippingAddressService = iShippingAddressService;
     _iMessageService         = iMessageService;
     _iMemberSignInService    = iMemberSignInService;
     _iDistributionService    = iDistributionService;
     _iRefundService          = iRefundService;
     _iCommentService         = iCommentService;
 }
 public UserOrderController(
     IShopBonusService iShopBonusService,
     ICashDepositsService iCashDepositsService,
     ISiteSettingService iSiteSettingService,
     IOrderService iOrderService,
     IRefundService iRefundService,
     ICustomerService iCustomerService,
     IProductService iProductService,
     ICouponService iCouponService,
     ICommentService iCommentService,
     IFightGroupService iFightGroupService, ITypeService iTypeService
     )
 {
     _iShopBonusService    = iShopBonusService;
     _iCashDepositsService = iCashDepositsService;
     _iSiteSettingService  = iSiteSettingService;
     _iOrderService        = iOrderService;
     _iRefundService       = iRefundService;
     _iCustomerService     = iCustomerService;
     _iProductService      = iProductService;
     _iCouponService       = iCouponService;
     _iCommentService      = iCommentService;
     _iFightGroupService   = iFightGroupService;
     _iTypeService         = iTypeService;
 }
Exemple #3
0
 public PaymentGatewayController(IAuthorizeService authorizeService, ICaptureService captureService, IVoidService voidService, IRefundService refundService)
 {
     _authorizeService = authorizeService;
     _captureService   = captureService;
     _voidService      = voidService;
     _refundService    = refundService;
 }
 public OrderRefundController(IOrderService iOrderService, IRefundService iRefundService, IShopService iShopService, IVShopService iVShopService)
 {
     _iOrderService  = iOrderService;
     _iRefundService = iRefundService;
     _iShopService   = iShopService;
     _iVShopService  = iVShopService;
 }
        public LoansController(
            UserManager <ApplicationUser> userManager,
            RoleManager <IdentityRole> roleManager,
            ILogger <LoansController> logger,
            IMapper mapper,
            IGenerator generator,
            IProductService productService,
            IEmployeeService employeeService,
            ICustomerService customerService,
            ILoanService loanService,
            ILoanApprovalService loanApprovalService,
            IRefundService refundService,
            IRefundConfirmService refundConfirmService

            ) : base(userManager, roleManager, mapper, generator)
        {
            _logger               = logger;
            _employeeService      = employeeService;
            _customerService      = customerService;
            _loanService          = loanService;
            _loanapprovalService  = loanApprovalService;
            _refundService        = refundService;
            _refundconfirmService = refundConfirmService;
            _productService       = productService;
        }
 public StripeConnectPaymentProcessor(ILocalizationService localizationService,
                                      IWebHelper webHelper,
                                      ISettingService settingService,
                                      StripeConnectObjectContext stripeConnectObjectContext,
                                      IChargeService chargeService,
                                      IWorkContext workContext,
                                      IStoreContext storeContext,
                                      IPriceCalculationService priceCalculationService,
                                      ILogger logger,
                                      IVendorService vendorService,
                                      ICustomerService customerService,
                                      IRefundService refundService)
 {
     _localizationservice        = localizationService;
     _webhelper                  = webHelper;
     _settingService             = settingService;
     _stripeConnectObjectContext = stripeConnectObjectContext;
     _chargeService              = chargeService;
     _workContext                = workContext;
     _storeContext               = storeContext;
     _priceCalculationService    = priceCalculationService;
     _logger          = logger;
     _vendorService   = vendorService;
     _customerService = customerService;
     _refundService   = refundService;
 }
 private static void GetServices()
 {
     _tokenService             = _serviceProvider.GetService <ITokenService>();
     _chargeService            = _serviceProvider.GetService <IChargeService>();
     _captureService           = _serviceProvider.GetService <ICaptureService>();
     _refundService            = _serviceProvider.GetService <IRefundService>();
     _customerService          = _serviceProvider.GetService <ICustomerService>();
     _paymentInstrumentService = _serviceProvider.GetService <IPaymentInstrumentService>();
 }
Exemple #8
0
        public JsonResult ConfirmRefund(long refundId, string managerRemark)
        {
            Result         result        = new Result();
            IRefundService refundService = ServiceHelper.Create <IRefundService>();

            refundService.ConfirmRefund(refundId, managerRemark, base.CurrentManager.UserName);
            result.success = true;
            return(Json(result));
        }
Exemple #9
0
 public PayController(IOrderService iOrderService, ICashDepositsService iCashDepositsService, IMemberCapitalService iMemberCapitalService
                      , IRefundService iRefundService, IShopService iShopService, IFightGroupService iFightGroupService)
 {
     _iOrderService         = iOrderService;
     _iCashDepositsService  = iCashDepositsService;
     _iMemberCapitalService = iMemberCapitalService;
     _iRefundService        = iRefundService;
     _iShopService          = iShopService;
     _iFightGroupService    = iFightGroupService;
 }
Exemple #10
0
 public RefundClaimant(IRefundService refundService, IBlockchainBridge blockchainBridge,
                       IDepositDetailsRepository depositRepository, ITransactionVerifier transactionVerifier,
                       ILogManager logManager)
 {
     _refundService       = refundService;
     _blockchainBridge    = blockchainBridge;
     _depositRepository   = depositRepository;
     _transactionVerifier = transactionVerifier;
     _logger = logManager.GetClassLogger();
 }
Exemple #11
0
 public MemberController(IMemberService memberService, ILoginCodeService loginCodeService, IExchangeService exchangeService, IRechargeRecordService rechargeRecordService,
                         ICooperationService cooperationService, IRefundService refundService, ICosFileStatService cosFileStatService)
 {
     _memberService         = memberService;
     _loginCodeService      = loginCodeService;
     _exchangeService       = exchangeService;
     _rechargeRecordService = rechargeRecordService;
     _cooperationService    = cooperationService;
     _refundService         = refundService;
     _cosFileStatService    = cosFileStatService;
 }
Exemple #12
0
 public PaymentRequestsController(
     [NotNull] IPaymentRequestService paymentRequestService,
     [NotNull] IRefundService refundService,
     [NotNull] IAssetSettingsService assetSettingsService,
     [NotNull] ILogFactory logFactory,
     [NotNull] IPaymentRequestDetailsBuilder paymentRequestDetailsBuilder)
 {
     _paymentRequestService        = paymentRequestService ?? throw new ArgumentNullException(nameof(paymentRequestService));
     _refundService                = refundService ?? throw new ArgumentNullException(nameof(refundService));
     _assetSettingsService         = assetSettingsService ?? throw new ArgumentNullException(nameof(assetSettingsService));
     _paymentRequestDetailsBuilder = paymentRequestDetailsBuilder ?? throw new ArgumentNullException(nameof(paymentRequestDetailsBuilder));
     _log = logFactory.CreateLog(this);
 }
Exemple #13
0
 public PaymentRequestsController(
     IPaymentRequestService paymentRequestService,
     IRefundService refundService,
     IAssetsAvailabilityService assetsAvailabilityService,
     ILog log,
     IPaymentRequestDetailsBuilder paymentRequestDetailsBuilder)
 {
     _paymentRequestService        = paymentRequestService;
     _refundService                = refundService;
     _assetsAvailabilityService    = assetsAvailabilityService;
     _paymentRequestDetailsBuilder = paymentRequestDetailsBuilder;
     _log = log.CreateComponentScope(nameof(PaymentRequestsController));
 }
 public void Setup()
 {
     Prepare();
     _claimedRefundTransactionHash = TestItem.KeccakA;
     _refundService = Substitute.For <IRefundService>();
     _refundService.ClaimRefund(Arg.Any <Address>(), Arg.Any <RefundClaim>())
     .Returns(_claimedRefundTransactionHash);
     _refundService.ClaimEarlyRefund(Arg.Any <Address>(), Arg.Any <EarlyRefundClaim>())
     .Returns(_claimedRefundTransactionHash);
     _depositRepository   = Substitute.For <IDepositDetailsRepository>();
     _transactionVerifier = Substitute.For <ITransactionVerifier>();
     _transactionVerifier.Verify(Arg.Any <TxReceipt>()).Returns(new TransactionVerifierResult(true, 1, 1));
     _refundClaimant = new RefundClaimant(_refundService, _bridge, _depositRepository,
                                          _transactionVerifier, LimboLogs.Instance);
 }
Exemple #15
0
        public PayController(IOrderService iOrderService, ICashDepositsService iCashDepositsService, IMemberCapitalService iMemberCapitalService
                             , IRefundService iRefundService, IShopService iShopService, IFightGroupService iFightGroupService,
                             IHttpContextAccessor httpContextAccessor,
                             IWebHostEnvironment environment
                             )
        {
            _iOrderService         = iOrderService;
            _iCashDepositsService  = iCashDepositsService;
            _iMemberCapitalService = iMemberCapitalService;
            _iRefundService        = iRefundService;
            _iShopService          = iShopService;
            _iFightGroupService    = iFightGroupService;

            _httpContextAccessor = httpContextAccessor;
            _hostingEnvironment  = environment;
        }
 public TransactionController(IWalletService walletService,
                              ITransactionService transactionService,
                              UserManager <ApplicationUser> userManager,
                              ITransferService transferService,
                              IReebuxService reebuxService,
                              IRefundService refundService,
                              IProductService productService)
 {
     this.walletService      = walletService;
     this.transactionService = transactionService;
     this.userManager        = userManager;
     this.transferService    = transferService;
     this.reebuxService      = reebuxService;
     this.refundService      = refundService;
     this.productService     = productService;
 }
Exemple #17
0
 public ConsumerService(IAccountService accountService, IDataAssetService dataAssetService,
                        IDataRequestService dataRequestService, IDataConsumerService dataConsumerService,
                        IDataStreamService dataStreamService, IDepositManager depositManager,
                        IDepositApprovalService depositApprovalService, IProviderService providerService,
                        IReceiptService receiptService, IRefundService refundService, ISessionService sessionService)
 {
     _accountService         = accountService;
     _dataAssetService       = dataAssetService;
     _dataRequestService     = dataRequestService;
     _dataConsumerService    = dataConsumerService;
     _dataStreamService      = dataStreamService;
     _depositManager         = depositManager;
     _depositApprovalService = depositApprovalService;
     _providerService        = providerService;
     _receiptService         = receiptService;
     _refundService          = refundService;
     _sessionService         = sessionService;
 }
 public void Setup()
 {
     Prepare();
     _claimedRefundTransactionHash = TestItem.KeccakA;
     _refundService = Substitute.For <IRefundService>();
     _refundService.ClaimRefundAsync(Arg.Any <Address>(), Arg.Any <RefundClaim>(), Arg.Any <UInt256>())
     .Returns(_claimedRefundTransactionHash);
     _refundService.ClaimEarlyRefundAsync(Arg.Any <Address>(), Arg.Any <EarlyRefundClaim>(), Arg.Any <UInt256>())
     .Returns(_claimedRefundTransactionHash);
     _depositRepository   = Substitute.For <IDepositDetailsRepository>();
     _transactionVerifier = Substitute.For <ITransactionVerifier>();
     _transactionVerifier.VerifyAsync(Arg.Any <NdmTransaction>())
     .Returns(new TransactionVerifierResult(true, 1, 1));
     _gasPriceService = Substitute.For <IGasPriceService>();
     _timestamper     = Timestamper.Default;
     _refundClaimant  = new RefundClaimant(_refundService, _ndmBridge, _depositRepository,
                                           _transactionVerifier, _gasPriceService, _timestamper, LimboLogs.Instance);
 }
 public BranchOrderController()
 {
     _iOrderService = new OrderService();
     _iCartService = new CartService();
     _iMemberService = new MemberService();
     _iProductService = new ProductService();
     _iPaymentConfigService = new PaymentConfigService();
     _iCashDepositsService = new CashDepositsService();
     _iShopService = ServiceProvider.Instance<IShopService>.Create;
     _iLimitTimeBuyService = new LimitTimeBuyService();
     _iCouponService = new CouponService();
     _iShopBonusService = new ShopBonusService();
     _iCollocationService = new CollocationService();
     _iMemberCapitalService = new MemberCapitalService();
     _iShippingAddressService = new ShippingAddressService();
     _iMemberIntegralService = new MemberIntegralService();
     _iRegionService = new RegionService();
     _iVShopService = new VShopService();
     _iRefundService = new RefundService();
     _iFightGroupService = new FightGroupService();
 }
 public BranchOrderController()
 {
     this._iOrderService           = (IOrderService) new OrderService();
     this._iCartService            = (ICartService) new CartService();
     this._iMemberService          = (IMemberService) new MemberService();
     this._iProductService         = (IProductService) new ProductService();
     this._iPaymentConfigService   = (IPaymentConfigService) new PaymentConfigService();
     this._iCashDepositsService    = (ICashDepositsService) new CashDepositsService();
     this._iSiteSettingService     = (ISiteSettingService) new SiteSettingService();
     this._iShopService            = (IShopService) new ShopService();
     this._iLimitTimeBuyService    = (ILimitTimeBuyService) new LimitTimeBuyService();
     this._iCouponService          = (ICouponService) new CouponService();
     this._iShopBonusService       = (IShopBonusService) new ShopBonusService();
     this._iCollocationService     = (ICollocationService) new CollocationService();
     this._iMemberCapitalService   = (IMemberCapitalService) new MemberCapitalService();
     this._iShippingAddressService = (IShippingAddressService) new ShippingAddressService();
     this._iMemberIntegralService  = (IMemberIntegralService) new MemberIntegralService();
     this._iRegionService          = (IRegionService) new RegionService();
     this._iVShopService           = (IVShopService) new VShopService();
     this._iRefundService          = (IRefundService) new RefundService();
     this._iFightGroupService      = (IFightGroupService) new FightGroupService();
 }
Exemple #21
0
 public HomeController(UserManager <ApplicationUser> userManager,
                       RoleManager <IdentityRole> roleManager,
                       IMapper mapper,
                       ILogger <HomeController> logger,
                       IGenerator generator,
                       IEmployeeService employeeService,
                       ICustomerService customerService,
                       IDepositService depositService,
                       ILoanService loanService,
                       IRefundService refundService
                       ) : base(
         userManager,
         roleManager,
         mapper,
         generator
         )
 {
     _logger          = logger;
     _employeeService = employeeService;
     _customerService = customerService;
     _depositService  = depositService;
     _loanService     = loanService;
     _refundService   = refundService;
 }
Exemple #22
0
 public HomeController(IRefundService refundService)
 {
     _RefundService = refundService;
 }
Exemple #23
0
 public NegativeEarningsService(IRefundService refundService)
 {
     this.refundService = refundService;
 }
Exemple #24
0
        public ActionResult RefundApply(long id, long?itemId)
        {
            decimal?      nullable1;
            IOrderService orderService = ServiceHelper.Create <IOrderService>();
            OrderInfo     order        = orderService.GetOrder(id, base.CurrentUser.Id);

            if (order == null)
            {
                throw new HimallException("该订单已删除或不属于该用户");
            }
            if (order.OrderStatus < OrderInfo.OrderOperateStatus.WaitDelivery)
            {
                throw new HimallException("错误的售后申请,订单状态有误");
            }
            if (!itemId.HasValue && order.OrderStatus != OrderInfo.OrderOperateStatus.WaitDelivery)
            {
                throw new HimallException("错误的订单退款申请,订单状态有误");
            }
            orderService.CalculateOrderItemRefund(id, false);
            OrderItemInfo orderItemInfo = new OrderItemInfo();

            ViewBag.MaxRGDNumber    = 0;
            ViewBag.MaxRefundAmount = order.OrderEnabledRefundAmount;
            if (itemId.HasValue)
            {
                orderItemInfo = order.OrderItemInfo.Where((OrderItemInfo a) => {
                    long num      = a.Id;
                    long?nullable = itemId;
                    if (num != nullable.GetValueOrDefault())
                    {
                        return(false);
                    }
                    return(nullable.HasValue);
                }).FirstOrDefault();
                ViewBag.MaxRGDNumber = orderItemInfo.Quantity - orderItemInfo.ReturnQuantity;
                dynamic viewBag             = base.ViewBag;
                decimal?enabledRefundAmount = orderItemInfo.EnabledRefundAmount;
                decimal refundPrice         = orderItemInfo.RefundPrice;
                if (enabledRefundAmount.HasValue)
                {
                    nullable1 = new decimal?(enabledRefundAmount.GetValueOrDefault() - refundPrice);
                }
                else
                {
                    nullable1 = null;
                }
                //viewBag.MaxRefundAmount = nullable1;
            }
            else
            {
                orderItemInfo = order.OrderItemInfo.FirstOrDefault();
            }
            bool           flag          = false;
            IRefundService refundService = ServiceHelper.Create <IRefundService>();

            flag = (order.OrderStatus != OrderInfo.OrderOperateStatus.WaitDelivery ? refundService.CanApplyRefund(id, orderItemInfo.Id, new bool?(false)) : refundService.CanApplyRefund(id, orderItemInfo.Id, null));
            if (!flag)
            {
                throw new HimallException("您己申请过售后,不可重复申请");
            }
            ViewBag.UserName    = base.CurrentUser.RealName;
            ViewBag.Phone       = base.CurrentUser.CellPhone;
            ViewBag.OrderInfo   = order;
            ViewBag.OrderItemId = itemId;
            ViewBag.RefundWay   = "";
            List <SelectListItem> selectListItems = new List <SelectListItem>();
            SelectListItem        selectListItem  = new SelectListItem()
            {
                Text  = OrderRefundInfo.OrderRefundPayType.BackCapital.ToDescription(),
                Value = 3.ToString()
            };

            selectListItems.Add(selectListItem);
            List <SelectListItem> selectListItems1 = selectListItems;

            if (!string.IsNullOrWhiteSpace(order.PaymentTypeGateway) && order.PaymentTypeGateway.ToLower().Contains("weixin"))
            {
                SelectListItem selectListItem1 = new SelectListItem()
                {
                    Text  = OrderRefundInfo.OrderRefundPayType.BackOut.ToDescription(),
                    Value = 1.ToString()
                };
                selectListItems1.Add(selectListItem1);
            }
            ViewBag.RefundWay = selectListItems1;
            return(View(orderItemInfo));
        }
 public RequiredPaymentProcessor(IPaymentDueProcessor paymentsDue, IRefundService refundService)
 {
     this.paymentsDue   = paymentsDue;
     this.refundService = refundService;
 }
Exemple #26
0
 public RefundRemovedLearningAimService()
 {
     this.refundService       = new RefundService();
     this.paymentDueProcessor = new PaymentDueProcessor();
 }
 public RefundController(IRefundService refundService)
 {
     _refundService = refundService;
 }
Exemple #28
0
 public OrderRefundController(IRefundService iRefundService)
 {
     _iRefundService = iRefundService;
 }
Exemple #29
0
 public OrderRefundController(IRefundService iRefundService, IOrderService iOrderService, ITypeService iTypeService)
 {
     _iRefundService = iRefundService;
     _iOrderService  = iOrderService;
     _iTypeService   = iTypeService;
 }
 public ConsumerGasLimitsService(IDepositService depositService, IRefundService refundService)
 {
     GasLimits = new GasLimits(depositService.GasLimit, refundService.GasLimit);
 }