Beispiel #1
0
        public async Task <PaginatedPaymentsModel> GetFailedPaymentRequestsForCustomerAsync(string customerId, int currentPage, int pageSize)
        {
            var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize);

            var(paymentRequests, totalCount) =
                await _paymentsRepository.GetFailedPaymentRequestsForCustomerAsync(customerId, skip, take);

            return(new PaginatedPaymentsModel
            {
                CurrentPage = currentPage,
                PageSize = pageSize,
                PaymentRequests = paymentRequests,
                TotalCount = totalCount
            });
        }