Controller/StandardDispatcher.php
protected function getTransactionMode($basket)
    {
        $transactionMode = $this->getPayPalConfig()->getTransactionMode();

        if ($transactionMode == "Automatic") {
            $outOfStockValidator = new \OxidEsales\PayPalModule\Model\OutOfStockValidator();
            $outOfStockValidator->setBasket($basket);
            $outOfStockValidator->setEmptyStockLevel($this->getPayPalConfig()->getEmptyStockLevel());

            $transactionMode = ($outOfStockValidator->hasOutOfStockArticles()) ? "Authorization" : "Sale";

            return $transactionMode;
        }

        return $transactionMode;
    }
protected function getTransactionMode($basket)
    {
        $transactionMode = $this->getPayPalConfig()->getTransactionMode();

        if ($transactionMode == "Automatic") {
            $outOfStockValidator = new \OxidEsales\PayPalModule\Model\OutOfStockValidator();
            $outOfStockValidator->setBasket($basket);
            $outOfStockValidator->setEmptyStockLevel($this->getPayPalConfig()->getEmptyStockLevel());

            $transactionMode = ($outOfStockValidator->hasOutOfStockArticles()) ? "Authorization" : "Sale";

            return $transactionMode;
        }

        return $transactionMode;
    }
protected function getTransactionMode ( $ basket ) { $ transactionMode = $ this -> getPayPalConfig ( ) -> getTransactionMode ( ) ; if ( $ transactionMode == "Automatic" ) { $ outOfStockValidator = new \ OxidEsales \ PayPalModule \ Model \ OutOfStockValidator ( ) ; $ outOfStockValidator -> setBasket ( $ basket ) ; $ outOfStockValidator -> setEmptyStockLevel ( $ this -> getPayPalConfig ( ) -> getEmptyStockLevel ( ) ) ; $ transactionMode = ( $ outOfStockValidator -> hasOutOfStockArticles ( ) ) ? "Authorization" : "Sale" ; return $ transactionMode ; } return $ transactionMode ; }
Returns transaction mode.

@param \OxidEsales\Eshop\Application\Model\Basket $basket

@return string
Returns transaction mode .