Model/Order.php
public function getPayPalOrder($oxId = null)
    {
        if (is_null($this->payPalOrder)) {
            $orderId = is_null($oxId) ? $this->getId() : $oxId;
            $order = oxNew(\OxidEsales\PayPalModule\Model\PayPalOrder::class);
            $order->load($orderId);
            $this->payPalOrder = $order;
        }

        return $this->payPalOrder;
    }
public function getPayPalOrder($oxId = null)
    {
        if (is_null($this->payPalOrder)) {
            $orderId = is_null($oxId) ? $this->getId() : $oxId;
            $order = oxNew(\OxidEsales\PayPalModule\Model\PayPalOrder::class);
            $order->load($orderId);
            $this->payPalOrder = $order;
        }

        return $this->payPalOrder;
    }
public function getPayPalOrder ( $ oxId = null ) { if ( is_null ( $ this -> payPalOrder ) ) { $ orderId = is_null ( $ oxId ) ? $ this -> getId ( ) : $ oxId ; $ order = oxNew ( \ OxidEsales \ PayPalModule \ Model \ PayPalOrder :: class ) ; $ order -> load ( $ orderId ) ; $ this -> payPalOrder = $ order ; } return $ this -> payPalOrder ; }
Returns PayPal order object.

@param string $oxId

@return \OxidEsales\PayPalModule\Model\PayPalOrder|null
Returns PayPal order object .