Ejemplo n.º 1
0
        public async Task <IActionResult> DeletePaymentMethodAsync(int id)
        {
            var paymentMethodFromDb = await _paymentService.GetPaymentMethodAsync(id);

            if (paymentMethodFromDb == null)
            {
                return(BadRequest());
            }

            await _paymentService.RemovePaymentMethodAsync(paymentMethodFromDb);

            return(Ok());
        }