Code Duplication    Length = 8-9 lines in 2 locations

paylater.php 2 locations

@@ 854-862 (lines=9) @@
851
     * @param array $params
852
     * @return string
853
     */
854
    public function getPagantisLink($file, array $params = array())
855
    {
856
        $protocol = 'http://';
857
        if (Configuration::get('PS_SSL_ENABLED')) {
858
            $protocol = 'https://';
859
        }
860
        return $protocol.Tools::getHttpHost()._MODULE_DIR_.$this->name.'/'
861
            .$file.'?'.htmlspecialchars_decode(http_build_query($params));
862
    }
863
864
    /**
865
     * Retrocomatibility prestashop 1.4, it's necesary file path because doesn't exists ModuleFrontController
@@ 870-877 (lines=8) @@
867
     * @param array $params
868
     * @return string
869
     */
870
    public function getPagantisCallbackUrl($file, array $params = array())
871
    {
872
        $protocol = 'http://';
873
        if (Configuration::get('PS_SSL_ENABLED')) {
874
            $protocol = 'https://';
875
        }
876
        return $protocol.Tools::getHttpHost()._MODULE_DIR_.$this->name.'/'.$file.'?'.http_build_query($params);
877
    }
878
879
    public static function initModuleAccess()
880
    {