コード例 #1
0
        private async Task DoDeposit(string operationId)
        {
            var repeater = await repeaterFactory.GetRepeater(
                operationId,
                () => paymentClient.Deposit(operationId),
                int.MaxValue,
                () => throw new TransactionFailedException());

            await repeater.Wait();
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        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());
        }