Action/ATMOnline/DetermineBankAction.php
public function execute($request)
    {
        /** @var $request DetermineBank */
        if (!$this->supports($request)) {
            throw RequestNotSupportedException::createActionNotSupported($this, $request);
        }
        if (!$this->httpRequest) {
            throw new LogicException('The action can be run only when http request is set.');
        }

        $form = $this->createBankListForm();

        $form->handleRequest($this->httpRequest);
        if ($form->isSubmitted()) {
            /** @var BankInterface $bank */
            $bank = $form->getData();

            if ($form->isValid()) {
                $request->set($bank);

                return;
             }
        }

        $renderTemplate = new RenderTemplate($this->templateName, array(
            'form' => $form->createView()
        ));
        $this->payment->execute($renderTemplate);

        throw new HttpResponse(new Response($renderTemplate->getResult(), 200, array(
            'Cache-Control' => 'no-store, no-cache, max-age=0, post-check=0, pre-check=0',
            'Pragma' => 'no-cache',
        )));
    }
public function execute($request)
    {
        /** @var $request DetermineBank */
        if (!$this->supports($request)) {
            throw RequestNotSupportedException::createActionNotSupported($this, $request);
        }
        if (!$this->httpRequest) {
            throw new LogicException('The action can be run only when http request is set.');
        }

        $form = $this->createBankListForm();

        $form->handleRequest($this->httpRequest);
        if ($form->isSubmitted()) {
            /** @var BankInterface $bank */
            $bank = $form->getData();

            if ($form->isValid()) {
                $request->set($bank);

                return;
             }
        }

        $renderTemplate = new RenderTemplate($this->templateName, array(
            'form' => $form->createView()
        ));
        $this->payment->execute($renderTemplate);

        throw new HttpResponse(new Response($renderTemplate->getResult(), 200, array(
            'Cache-Control' => 'no-store, no-cache, max-age=0, post-check=0, pre-check=0',
            'Pragma' => 'no-cache',
        )));
    }
{@inheritDoc}