Example #1
0
 /// <summary>
 /// Debit account with given amount
 /// </summary>
 /// <param name="userId">User ID</param>
 /// <param name="accountType">Account Type</param>
 /// <param name="amount">Amount</param>
 /// <returns></returns>
 public async Task <TransactionResponse> DebitAsync(string userId, string accountType, int amount)
 {
     try
     {
         return(await _repo.DebitAsync(userId, _validations.GetAccountType(accountType), amount));
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.Message);
         throw;
     }
 }