// find specific payment card - via AJAX
 @RequestMapping(
     value = "{id}/details.json",
     method = RequestMethod.GET,
     headers = "Accept=application/json")
 public @ResponseBody PaymentCard details(@PathVariable Long id) {
   PaymentCard card = paymentCardService.findPaymentCardById(id);
   return card;
 }
 // delete a specific PaymentCard - form
 @RequestMapping(value = "{id}/delete", method = RequestMethod.GET)
 public String deleteForm(@PathVariable Long id, Model model) {
   PaymentCard paymentCard;
   try {
     paymentCard = paymentCardService.findPaymentCardById(id);
   } catch (NoResultException e) {
     return "cards/invalidPaymentCard";
   }
   model.addAttribute(paymentCard);
   return "cards/delete";
 }
 // edit a specific PaymentCard - form
 @RequestMapping(value = "{id}/edit", method = RequestMethod.GET)
 public String editForm(@PathVariable Long id, Model model) {
   PaymentCard paymentCard;
   List<String> types = paymentCardService.getTypes();
   model.addAttribute("typeList", types);
   try {
     paymentCard = paymentCardService.findPaymentCardById(id);
   } catch (NoResultException e) {
     return "cards/invalidPaymentCard";
   }
   model.addAttribute(paymentCard);
   return "cards/edit";
 }