/**
  * Get the refund status
  *
  * @REST\Get("/orders/{uuid}/refundStatus", defaults={"_format"="json"})
  * @REST\View
  */
 public function getRefundStatusAction(CustomerOrder $order)
 {
     if ($order->getUser()->getId() != $this->security->getToken()->getUser()->getId()) {
         throw new AccessDeniedException('Access denied');
     } else {
         if (CustomerOrder::TRANSACTION_TYPE_REFUND != $order->getTransactionType()) {
             throw new InvalidArgumentException('Order was not a refund');
         }
     }
     $refundResponse = $order->getStatusResponse();
     if (!$refundResponse) {
         throw new NotFoundHttpException(sprintf('Payment status for the order "%s" could not be found', $order->getUuid()));
     }
     return $refundResponse;
 }