Ejemplo n.º 1
0
        public OnlineDeposit VerifyOnlineDeposit(Guid id, string remarks = "remarks")
        {
            _onlineDepositCommands.Verify(new VerifyOnlineDepositRequest
            {
                Id      = id,
                Remarks = remarks
            });
            var deposit = _paymentRepository.OnlineDeposits.SingleOrDefault(x => x.Id == id);

            return(deposit);
        }
Ejemplo n.º 2
0
        public void Can_verify_online_deposit()
        {
            //Arrange
            var deposit = _paymentTestHelper.CreateOnlineDeposit(_testPlayer.Id, 300);

            var request = new VerifyOnlineDepositRequest
            {
                Id      = deposit.Id,
                Remarks = "verify remark"
            };

            //Act
            _depositCommands.Verify(request);

            //Assert
            var settings = _paymentRepositoryMock.OnlineDeposits.Single(x => x.Id == deposit.Id);

            settings.Status.Should().Be(OnlineDepositStatus.Verified);
            settings.Remarks.Should().Be(request.Remarks);
            settings.VerifiedBy.ShouldBeEquivalentTo(_actorInfoProvider.Actor.UserName);
            settings.Verified.Should().BeCloseTo(DateTimeOffset.Now, 5000);
        }
Ejemplo n.º 3
0
        public VerifyOnlineDepositResponse Verify(VerifyOnlineDepositRequest request)
        {
            VerifyPermission(Permissions.Verify, Modules.DepositVerification);

            var data = _onlineDepositQueries.GetOnlineDepositById(request.Id);

            CheckBrand(data.BrandId);

            var model = Mapper.Map <Core.Payment.Interface.Data.VerifyOnlineDepositRequest>(request);

            _onlineDepositCommands.Verify(model);

            return(new VerifyOnlineDepositResponse
            {
                Success = true
            });
        }