public ActionResult Documents(Guid requestId, string remarks)
 {
     try
     {
         _service.SetDocumentsState(requestId, remarks);
         return(this.Success("app:payment.withdraw.successfullyTaggedDocuments"));
     }
     catch (Exception exception)
     {
         return(this.Failed(exception));
     }
 }
예제 #2
0
        public void Withdrawal_goes_from_VQ_to_OHQ_after_tagged_documents()
        {
            //Create a withdrawal in the "Verification Queue"
            var withdrawal = new OfflineWithdraw();

            SetWithdrawalProperties(withdrawal, WithdrawalStatus.AutoVerificationFailed);

            //Move withdrawal to the "On Hold Queue"
            _withdrawalService.SetDocumentsState(_observedWithdrawalId, "Investigate withdrawal request.");

            //Assert that the withdrawal request was moved to the "On Hold Queue"
            var withdrawalsInTheOnHoldQueue = _withdrawalService.GetWithdrawalsOnHold();

            Assert.IsTrue(withdrawalsInTheOnHoldQueue.Any(wd => wd.Id == _observedWithdrawalId));
        }
예제 #3
0
        public async Task Can_verify_documents_withdrawal_request()
        {
            var player = _player;

            _walletRepository.SaveChanges();
            _paymentTestHelper.MakeDeposit(player.Id, 1000);
            await _gamesTestHelper.PlaceAndWinBet(1000, 10000, player.Id);

            Balance.Main = 10000;

            var response = _paymentTestHelper.MakeWithdraw(player.Id, _actorInfoProvider.Actor.UserName, 100);

            //assert balance after request
            _paymentTestHelper.AssertBalance(_player.Id
                                             , total: 10000, playable: 9900, main: 9900, free: 9900, withdrawalLock: 100);

            //have to revert withdraw,before verify
            var revertRemarks = TestDataGenerator.GetRandomString(10);

            _withdrawalService.Revert(response.Id, revertRemarks);

            var investigateRemarks = TestDataGenerator.GetRandomString(10);

            _withdrawalService.SetDocumentsState(response.Id, investigateRemarks);

            //assert balance after SetDocumentsState
            _paymentTestHelper.AssertBalance(_player.Id
                                             , total: 10000, playable: 9900, main: 9900, free: 9900, withdrawalLock: 100);

            var withdraw = _paymentRepository.OfflineWithdraws.FirstOrDefault(x => x.Id == response.Id);

            withdraw.Status.Should().Be(WithdrawalStatus.Documents);
            withdraw.DocumentsCheckDate.Should().Be(null);
            withdraw.DocumentsCheckStatus.Should().BeNull();
            withdraw.Remarks.Should().Be(investigateRemarks);

            var verifyRemarks = TestDataGenerator.GetRandomString(10);

            _withdrawalService.Verify(response.Id, verifyRemarks);

            withdraw = _paymentRepository.OfflineWithdraws.FirstOrDefault(x => x.Id == response.Id);
            withdraw.Status.Should().Be(WithdrawalStatus.Verified);
            withdraw.Verified.Should().BeCloseTo(DateTimeOffset.Now, 60000);
            withdraw.VerifiedBy.Should().Be(_actorInfoProvider.Actor.UserName);
            withdraw.Remarks.Should().Be(verifyRemarks);
            withdraw.DocumentsCheckDate.Should().BeCloseTo(DateTimeOffset.Now, 60000);
            withdraw.DocumentsCheckStatus.Should().Be(CommonVerificationStatus.Passed);
        }