Returns curl instance

@return \OxidEsales\PayPalModule\Core\Curl
494498
public function getCurl()
    {
        if (is_null($this->curl)) {
            $curl = oxNew(\OxidEsales\PayPalModule\Core\Curl::class);
            $this->setCurl($curl);
        }

        return $this->curl;
    }
612809
public function getPayPalRequestBuilder()
    {
        if ($this->payPalRequestBuilder === null) {
            $this->payPalRequestBuilder = oxNew(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequestBuilder::class);
        }

        return $this->payPalRequestBuilder;
    }
432400
public function getPayPalSandboxIpnHost()
    {
        if (empty($this->payPalIpnSandboxHost)) {
            $this->payPalIpnSandboxHost = self::OEPAYPAL_IPN_SANDBOX_HOST;
        }

        return $this->payPalIpnSandboxHost;
    }
1022628
public static function getInstance()
    {
        if (!function_exists("curl_init")) {
            Error::throwError("cine");
        }

        static $inst = null;
        if ($inst === null) {
            $inst = new Connection();
            $inst->client_user_agent = $inst->getBaseClientUserAgent();
        }
        return $inst;
    }
482698
private function chooseHttpClient()
    {
        if (null !== $this->httpClient) {
            return $this->httpClient;
        }

        $this->consoleLogger
            ->debug('Choosing HttpClient implementation.');

        if (\function_exists('curl_exec')) {
            $this->httpClient = $this->curlHttpClient;

            $this->consoleLogger
                ->debug('cURL available, use <info>CurlHttpClient</info>.');

            return $this->httpClient;
        }

        if ('1' === \ini_get('allow_url_fopen')) {
            $this->httpClient = $this->streamHttpClient;

            $this->consoleLogger
                ->debug("'allow_url_fopen' enabled, use <info>StreamHttpClient</info>");

            return $this->httpClient;
        }

        $this->consoleLogger
            ->debug('<error>Choosing HttpClient implementation failed.</error>');

        throw new HttpClientException(
            "Unable to choose HttpClient. Enable cURL extension (preffered) or turn on 'allow_url_fopen' in php.ini."
        );
    }
1121233
public function getClient(): SellsyClient
    {
        if (!$this->client instanceof SellsyClient) {
            $this->client = new SellsyClient(
                $this->getTransport(),
                $this->apiUrl,
                $this->oauthAccessToken,
                $this->oauthAccessTokenSecret,
                $this->oauthConsumerKey,
                $this->oauthConsumerSecret
            );
        }

        return $this->client;
    }
651503
public function getPayPalIpnConfig()
    {
        if (is_null($this->payPalIpnConfig)) {
            $this->setPayPalIPnConfig(oxNew(\OxidEsales\PayPalModule\Core\IpnConfig::class));
        }

        return $this->payPalIpnConfig;
    }
1044493
public function getBasket()
    {
        if (is_null($this->basket)) {
            /** @var \OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException $exception */
            $exception = oxNew(\OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException::class);
            throw $exception;
        }

        return $this->basket;
    }
485228
public function getApiUrl()
    {
        if ($this->isSandboxEnabled()) {
            $url = $this->getPayPalSandboxApiUrl();
        } else {
            $url = $this->getPayPalApiUrl();
        }

        return $url;
    }
845260
protected function getHttpClient()
    {
        if (is_null($this->httpClient)) {
            $this->httpClient = new Client($this->guzzle);
        }

        return $this->httpClient;
    }
1196053
public function getOrder()
    {
        if (is_null($this->order)) {
            /** @var \OxidEsales\PayPalModule\Core\Exception\PayPalResponseException $exception */
            $exception = oxNew(\OxidEsales\PayPalModule\Core\Exception\PayPalResponseException::class, 'OEPAYPAL_ORDER_ERROR');
            throw $exception;
        }

        return $this->order;
    }
1348099
private function getHTTPClient()
    {
        if ($this->httpClient instanceof ClientInterface === false) {
            $this->httpClient = new HTTPClient();
        }

        return $this->httpClient;
    }
789691
protected function get_curl_obj()
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->curl_ssl_verify_peer);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->curl_ssl_verify_host);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connect_timeout);

        if ($this->debug) {
            curl_setopt($ch, CURLOPT_VERBOSE, true);
        }

        if ($this->cookies != '') {
            curl_setopt($ch, CURLOPT_COOKIESESSION, true);
            curl_setopt($ch, CURLOPT_COOKIE, $this->cookies);
        }

        return $ch;
    }
937377
public static function instance()
    {
        if ( self::$instance === null )
        {
            $serviceContainer = ezpKernel::instance()->getServiceContainer();
            self::$instance = new self( $serviceContainer->get( 'ezpublish.api.repository' ) );
        }

        return self::$instance;
    }
240428
public function getPayment()
    {
        if ($this->_oPayment === null) {
            $this->_oPayment = false;

            $oBasket = $this->getBasket();
            $oUser = $this->getUser();

            // payment is set ?
            $sPaymentid = $oBasket->getPaymentId();
            $oPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);

            if ($sPaymentid && $oPayment->load($sPaymentid) &&
                $oPayment->isValidPayment(
                    \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('dynvalue'),
                    \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId(),
                    $oUser,
                    $oBasket->getPriceForPayment(),
                    \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('sShipSet')
                )
            ) {
                $this->_oPayment = $oPayment;
            }
        }

        return $this->_oPayment;
    }
1189718
public function getUrl() { // $includeId = true
        OpenpayConsole::trace('OpenpayApiResourceBase @getUrl > class/parent: '.get_class($this).'/'.($this->parent ? 'true' : 'false'));
        $parentUrl = '';

        if ($this->parent) {
            $parentUrl = $this->parent->getUrl();
            if ($this->parent instanceof OpenpayApiDerivedResource) {
                return $parentUrl.($this->id ? '/'.$this->id : '');
            }
        }
        $resourceUrlName = $this->getResourceUrlName();
        return ($parentUrl != '' ? $parentUrl : '').($resourceUrlName != '' ? '/'.$resourceUrlName : '').($this->id ? '/'.$this->id : '');
    }
161173
public static function ipn()
        {
            // only accept post data
            if (!count($_POST)) {
                return false;
            }

            // if production mode...
            if (Config::get('paypal.production_mode')) {
                // use production endpoint
                $endpoint = 'https://www.paypal.com/cgi-bin/webscr';
            } else {
                // use sandbox endpoint
                $endpoint = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
            }

            // build response
            $fields = http_build_query(array('cmd' => '_notify-validate') + Input::all());

            // curl request
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $endpoint);
            curl_setopt($ch, CURLOPT_TIMEOUT, 30);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
            $response = curl_exec($ch);
            $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

            // if errors...
            if (curl_errno($ch)) {
                #$errors = curl_error($ch);
                curl_close($ch);

                // return false
                return false;
            } else {
                // close connection
                curl_close($ch);

                // if success...
                if ($code === 200 and $response === 'VERIFIED') {
                    return true;
                } else {
                    return false;
                }
            }
        }