public function processCallback(OrderInterface $order, $action)
    {
        $params = [
            'bank' => $this->getCode(),
            'reference' => $order->getReference(),
            'check' => $this->generateUrlCheck($order),
            'action' => $action,
        ];

        $url = $this->router->generate($this->getOption('url_callback'), $params, UrlGeneratorInterface::ABSOLUTE_URL);

        $response = $this->browser->get($url);

        $routeName = 'ok' === $response->getContent() ? 'url_return_ok' : 'url_return_ko';

        $response = new RedirectResponse($this->router->generate($this->getOption($routeName), $params, true), 302, [
            'Content-Type' => 'text/plain',
        ]);
        $response->setPrivate();

        return $response;
    }
public function processCallback(OrderInterface $order, $action)
    {
        $params = [
            'bank' => $this->getCode(),
            'reference' => $order->getReference(),
            'check' => $this->generateUrlCheck($order),
            'action' => $action,
        ];

        $url = $this->router->generate($this->getOption('url_callback'), $params, UrlGeneratorInterface::ABSOLUTE_URL);

        $response = $this->browser->get($url);

        $routeName = 'ok' === $response->getContent() ? 'url_return_ok' : 'url_return_ko';

        $response = new RedirectResponse($this->router->generate($this->getOption($routeName), $params, true), 302, [
            'Content-Type' => 'text/plain',
        ]);
        $response->setPrivate();

        return $response;
    }
public function processCallback ( OrderInterface $ order , $ action ) { $ params = [ 'bank' => $ this -> getCode ( ) , 'reference' => $ order -> getReference ( ) , 'check' => $ this -> generateUrlCheck ( $ order ) , 'action' => $ action , ] ; $ url = $ this -> router -> generate ( $ this -> getOption ( 'url_callback' ) , $ params , UrlGeneratorInterface :: ABSOLUTE_URL ) ; $ response = $ this -> browser -> get ( $ url ) ; $ routeName = 'ok' === $ response -> getContent ( ) ? 'url_return_ok' : 'url_return_ko' ; $ response = new RedirectResponse ( $ this -> router -> generate ( $ this -> getOption ( $ routeName ) , $ params , true ) , 302 , [ 'Content-Type' => 'text/plain' , ] ) ; $ response -> setPrivate ( ) ; return $ response ; }
Handle the callback.

@param OrderInterface $order
@param string         $action

@return Response
Handle the callback .