Method sets params for article and returns it's object.

@return \OxidEsales\PayPalModule\Model\ArticleToExpressCheckoutCurrentItem
167881
protected function getCurrentArticle()
    {
        $currentItem = oxNew(\OxidEsales\PayPalModule\Model\ArticleToExpressCheckoutCurrentItem::class);
        $currentArticleId = $this->getRequest()->getPostParameter('aid');
        $products = $this->_getItems();
        $productInfo = $products[$currentArticleId];
        $currentItem->setArticleId($currentArticleId);
        $currentItem->setSelectList($productInfo['sel']);
        $currentItem->setPersistParam($productInfo['persparam']);
        $currentItem->setArticleAmount($productInfo['am']);

        return $currentItem;
    }
913078
public function &GetPaymentHandler()
    {
        $oPaymentHandler = $this->GetFromInternalCache('oOrderPaymentHandler');
        if (is_null($oPaymentHandler)) {
            $oPaymentMethod = $this->GetFieldShopPaymentMethod();
            if ($oPaymentMethod) {
                $aParameter = array();
                $oPaymentParameterList = $this->GetFieldShopOrderPaymentMethodParameterList();
                while ($oParam = $oPaymentParameterList->Next()) {
                    $aParameter[$oParam->fieldName] = $oParam->fieldValue;
                }
                try {
                    $oPaymentHandler = $this->getShopPaymentHandlerFactory()->createPaymentHandler($oPaymentMethod->fieldShopPaymentHandlerId, $this->fieldCmsPortalId, $aParameter);
                    $this->SetInternalCache('oOrderPaymentHandler', $oPaymentHandler);
                } catch (ConfigurationException $e) {
                    $this->getLogger()->error(
                        sprintf('Unable to create payment handler: %s', $e->getMessage()),
                        [
                            'paymentHandlerId' => $oPaymentMethod->fieldShopPaymentHandlerId,
                            'portalId' => $this->fieldCmsPortalId,
                        ]
                    );
                }
            }
        }

        return $oPaymentHandler;
    }
695143
public function encrypt()
    {
        $encryptParameter = new EncryptParameter([
            'shopLogin' => $this->shopLogin,
            'amount' => number_format(round($this->paymentBridge->getAmount() / 100, 2), 2, ".", ""),
            'shopTransactionId' => $this->transactionIdAssembler->assemble(),
            'uicCode' => $this->currencyResolver->getCurrencyCode(),
            'languageId' => Language::ENGLISH,
        ]);

        $encryptParameter->setCustomInfo($this->paymentBridge->getCustomInfo());

        if ($this->apiKey) {
            $encryptParameter->apikey = $this->apiKey;
        }

        return $this->encryptClient->encrypt($encryptParameter);
    }
485320
public function &GetAffectedBasketArticles()
    {
        if (is_null($this->oAffectedBasketArticles)) {
            $this->oAffectedBasketArticles = null;
            $oBasket = TShopBasket::GetInstance();
            $this->oAffectedBasketArticles = &$oBasket->GetArticlesAffectedByShippingType($this);
        }

        return $this->oAffectedBasketArticles;
    }
479682
public function addBaseParams()
    {
        $request = $this->getPayPalRequest();
        $payPalConfig = $this->getPayPalConfig();

        $request->setParameter("CALLBACKVERSION", "84.0");
        $request->setParameter("LOCALECODE", $this->getLang()->translateString("OEPAYPAL_LOCALE"));
        // enabled guest buy (Buyer does not need to create a PayPal account to check out)
        $request->setParameter("SOLUTIONTYPE", ($payPalConfig->isGuestBuyEnabled() ? "Sole" : "Mark"));
        $request->setParameter("BRANDNAME", $payPalConfig->getBrandName());
        $request->setParameter("CARTBORDERCOLOR", $payPalConfig->getBorderColor());

        $request->setParameter("RETURNURL", $this->getReturnUrl());
        $request->setParameter("CANCELURL", $this->getCancelUrl());

        if ($logoImage = $payPalConfig->getLogoUrl()) {
            $request->setParameter("LOGOIMG", $logoImage);
        }

        $request->setParameter("PAYMENTREQUEST_0_PAYMENTACTION", $this->getTransactionMode());
    }
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;
    }
636963
public function getBasketArticles()
    {
        $aBasketArticles = [];
        /** @var \oxBasketItem $oBasketItem */
        foreach ($this->_aBasketContents as $sItemKey => $oBasketItem) {
            try {
                $oProduct = $oBasketItem->getArticle(true);

                if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) {
                    // marking chosen select list
                    $aSelList = $oBasketItem->getSelList();
                    if (is_array($aSelList) && ($aSelectlist = $oProduct->getSelectLists($sItemKey))) {
                        reset($aSelList);
                        foreach ($aSelList as $conkey => $iSel) {
                            $aSelectlist[$conkey][$iSel]->selected = 1;
                        }
                        $oProduct->setSelectlist($aSelectlist);
                    }
                }
            } catch (\OxidEsales\Eshop\Core\Exception\NoArticleException $oEx) {
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
                $this->removeItem($sItemKey);
                $this->calculateBasket(true);
                continue;
            } catch (\OxidEsales\Eshop\Core\Exception\ArticleInputException $oEx) {
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
                $this->removeItem($sItemKey);
                $this->calculateBasket(true);
                continue;
            }

            $aBasketArticles[$sItemKey] = $oProduct;
        }

        return $aBasketArticles;
    }
994327
public function getPayPalIpnHost()
    {
        if (empty($this->payPalIpnHost)) {
            $this->payPalIpnHost = self::OEPAYPAL_IPN_HOST;
        }

        return $this->payPalIpnHost;
    }
776705
public function getPayPalRequest()
    {
        if ($this->payPalRequest === null) {
            $this->payPalRequest = oxNew(\OxidEsales\PayPalModule\Core\Request::class);
        }

        return $this->payPalRequest;
    }
347249
public function sendOrderInfoToPayPal()
    {
        $sendInfoToPayPalEnabled = $this->getPayPalConfig()->sendOrderInfoToPayPal();
        if ($sendInfoToPayPalEnabled) {
            /** @var \OxidEsales\PayPalModule\Model\Basket $basket */
            $basket = $this->getSession()->getBasket();
            $sendInfoToPayPalEnabled = !$basket->isFractionQuantityItemsPresent();
        }

        return $sendInfoToPayPalEnabled;
    }
1037464
public function getArticles()
    {
        if (is_null($this->_aArtIds)) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = "select oxobjectid from oxobject2delivery where oxdeliveryid=" . $oDb->quote($this->getId()) . " and oxtype = 'oxarticles'";
            $aArtIds = $oDb->getCol($sQ);
            $this->_aArtIds = $aArtIds;
        }

        return $this->_aArtIds;
    }
332842
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The article location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        try {
            $articleId = $this->getArticleService()->makeArticle($parent);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        return $this->redirect()->toRoute(
            'sc-admin/article/edit',
            ['id' => $articleId]
        );
    }
1226897
protected function GetPaymentParameter()
    {
        $aParameter = array();
        $sCurrency = $this->GetCurrencyIdentifier();
        $oLocal = &TCMSLocal::GetActive();
        $oShopBasket = TShopBasket::GetInstance();
        $aParameter['merchantId'] = $this->GetTestLiveModeParameter('merchantId');
        $aParameter['refno'] = $this->GetRefNoParameter();
        $aParameter['reqtype'] = $this->GetConfigParameter('reqtype');
        $aParameter['amount'] = str_replace(',', '.', $oLocal->FormatNumber($oShopBasket->dCostTotal)) * 100;
        $aParameter['currency'] = $sCurrency;
        $aParameter['hiddenMode'] = $this->GetConfigParameter('hiddenMode');
        $sRedirectULR = $this->GetResponseURL();
        $aParameter['successUrl'] = $sRedirectULR;
        $aParameter['errorUrl'] = $sRedirectULR;
        $aParameter['cancelUrl'] = $sRedirectULR;

        return $aParameter;
    }
348734
public function setParameters()
	{		
		//set the url parameter from the UrlParserObjectInstance
		$this->parameters = $this->UrlParserObjectInstance->getParameters();

		//populate the Input Class data
		Input::setGet()->setPost();
		
		//return this object instance
		return $this;

	}
683132
public function getPayPalRequest()
    {
        if (is_null($this->payPalRequest)) {
            $requestBuilder = $this->getPayPalRequestBuilder();

            $data = $this->getData();

            $requestBuilder->setAuthorizationId($data->getAuthorizationId());
            $requestBuilder->setAmount($data->getAmount(), $data->getCurrency());

            $this->payPalRequest = $requestBuilder->getRequest();
        }

        return $this->payPalRequest;
    }
244734
public function getArticles($articleNumber = null)
    {
        $requestData = new Get\RequestData();
        $requestData->setArticleNumber($articleNumber);

        $request = new Get\Request($requestData);

        return $this->sendRequest($request, Get\ApiResponse::class);
    }
432400
public function getPayPalSandboxIpnHost()
    {
        if (empty($this->payPalIpnSandboxHost)) {
            $this->payPalIpnSandboxHost = self::OEPAYPAL_IPN_SANDBOX_HOST;
        }

        return $this->payPalIpnSandboxHost;
    }