Esempio n. 1
0
        public async Task <SaveTopUpResponse> SaveAsync(TopUpHistory topUpHistory)
        {
            try
            {
                await _eWalletRepository.AddTopUpAsync(topUpHistory);

                await _unitOfWork.CompleteAsync();

                return(new SaveTopUpResponse(topUpHistory));
            }
            catch (Exception ex)
            {
                _logger.LogError($"An error occurred when saving the top up transaction: {ex.Message}");
                return(new SaveTopUpResponse($"An error occurred when saving the top up transaction: {ex.Message}"));
            }
        }
Esempio n. 2
0
 public Task AddTopUpAsync(TopUpHistory topUpHistory)
 {
     throw new System.NotImplementedException();
 }
Esempio n. 3
0
 public SaveTopUpResponse(TopUpHistory topUpHistory) : this(true, string.Empty,
                                                            topUpHistory)
 {
 }
Esempio n. 4
0
 private SaveTopUpResponse(bool success, string message, TopUpHistory topUpHistory)
 {
     TopUpHistory = topUpHistory;
     BaseResponse = new BaseResponse(success, message);
 }