private async Task DoDeposit(string operationId) { var repeater = await repeaterFactory.GetRepeater( operationId, () => paymentClient.Deposit(operationId), int.MaxValue, () => throw new TransactionFailedException()); await repeater.Wait(); }
private async Task <bool> Rollback(RetailTransaction transaction) { var repeater = await repeaterFactory.GetRepeater( transaction.OperationId, () => ecomClient.Rollback(transaction.OrderId), retailAuthorizeOptions.TimeoutCount, () => throw new TransactionFailedException()); return(await repeater.Wait()); }
private async Task <AuthorizeStatus> AuthorizeInEcom(StartRetailPaymentCommand command) { var authorizeRequest = new EcomAuthorizeRequest(); var repeater = await repeaterFactory.GetRepeater( command.OperationId, () => ecomClient.Authorize(authorizeRequest), retailAuthorizeOptions.TimeoutCount, () => throw new TransactionFailedException()); return(await repeater.Wait()); }