public function buildJsRedirect()
    {
        if (!is_null($this->js)) {
            return $this->js;
        }

        $builder = new ShopgateBuilder($this->initConfig());

        try {
            $this->js = $builder->buildJsRedirect($this->request->getParams(), $_COOKIE);
        } catch (\ShopgateMerchantApiException $e) {
            $this->logger->error('JS > oAuth access token for store not set: ' . $e->getMessage());

            return null;
        } catch (\Exception $e) {
            $this->logger->error('JS > error in HTTP redirect: ' . $e->getMessage());

            return null;
        }

        return $this->js;
    }
public function buildJsRedirect()
    {
        if (!is_null($this->js)) {
            return $this->js;
        }

        $builder = new ShopgateBuilder($this->initConfig());

        try {
            $this->js = $builder->buildJsRedirect($this->request->getParams(), $_COOKIE);
        } catch (\ShopgateMerchantApiException $e) {
            $this->logger->error('JS > oAuth access token for store not set: ' . $e->getMessage());

            return null;
        } catch (\Exception $e) {
            $this->logger->error('JS > error in HTTP redirect: ' . $e->getMessage());

            return null;
        }

        return $this->js;
    }
public function buildJsRedirect ( ) { if ( ! is_null ( $ this -> js ) ) { return $ this -> js ; } $ builder = new ShopgateBuilder ( $ this -> initConfig ( ) ) ; try { $ this -> js = $ builder -> buildJsRedirect ( $ this -> request -> getParams ( ) , $ _COOKIE ) ; } catch ( \ ShopgateMerchantApiException $ e ) { $ this -> logger -> error ( 'JS > oAuth access token for store not set: ' . $ e -> getMessage ( ) ) ; return null ; } catch ( \ Exception $ e ) { $ this -> logger -> error ( 'JS > error in HTTP redirect: ' . $ e -> getMessage ( ) ) ; return null ; } return $ this -> js ; }
Instantiates the JS script builder object

@return Shopgate_Helper_Redirect_Type_Js | null
Instantiates the JS script builder object