public async Task <IActionResult> Delete(int id) { try { if (!ModelState.IsValid) { throw new Exception("Petición de eliminar inválida"); } return(Ok(await _paymentStatusService.DeleteAsync(id, _apiDbContext))); } catch (Exception e) { return(StatusCode(500, e.Message)); } }