Sonata\PaymentBundle\Controller\PaymentController::errorAction PHP Method

errorAction() public method

This action is called by the user after the sendbank In most case the order is already cancelled by a previous callback.
public errorAction ( ) : Response
return Symfony\Component\HttpFoundation\Response
    public function errorAction()
    {
        try {
            $order = $this->getPaymentHandler()->handleError($this->getRequest(), $this->getBasket());
        } catch (EntityNotFoundException $ex) {
            throw new NotFoundHttpException($ex->getMessage());
        } catch (InvalidTransactionException $ex) {
            throw new UnauthorizedHttpException($ex->getMessage());
        }
        return $this->render('SonataPaymentBundle:Payment:error.html.twig', array('order' => $order));
    }