async Task <Response> IVirtualCashCardService.Withdraw(string cardNumber, string pin, int amount)
        {
            var response = new Response();

            try
            {
                if (string.IsNullOrWhiteSpace(cardNumber))
                {
                    response.ErrorMessage = "Invalid card number.";
                    return(response);
                }

                if (string.IsNullOrWhiteSpace(pin))
                {
                    response.ErrorMessage = "Invalid pin number.";
                    return(response);
                }

                if (amount <= 0)
                {
                    response.ErrorMessage = "Invalid amount.";
                    return(response);
                }

                var getAccountResponse = await _repository.GetAccount(cardNumber, pin);

                if (getAccountResponse == null || !getAccountResponse.Success)
                {
                    response.ErrorMessage = getAccountResponse.ErrorMessage;
                    return(response);
                }

                var withdrawResponse = await _repository.Withdraw(getAccountResponse.Data.Id, amount);

                if (!withdrawResponse.Success)
                {
                    response.ErrorMessage = withdrawResponse.ErrorMessage;
                    return(response);
                }

                response.Success = true;
            }
            catch (Exception)
            {
                // Log exception using DI Logger (Nuget Common Logging)
                response.ErrorMessage = "Unexpected error while withdrawing.";
            }

            return(response);
        }