Model/OrderManager.php
protected function getOrderFromPayment($orderPayment)
    {
        $orderId = null;
        $order = null;
        if (!is_null($orderPayment)) {
            $orderId = $orderPayment->getOrderId();
        }
        if (!is_null($orderId)) {
            $order = oxNew(\OxidEsales\PayPalModule\Model\PayPalOrder::class);
            $order->setOrderId($orderId);
            $order->load();
        }

        return $order;
    }
protected function getOrderFromPayment($orderPayment)
    {
        $orderId = null;
        $order = null;
        if (!is_null($orderPayment)) {
            $orderId = $orderPayment->getOrderId();
        }
        if (!is_null($orderId)) {
            $order = oxNew(\OxidEsales\PayPalModule\Model\PayPalOrder::class);
            $order->setOrderId($orderId);
            $order->load();
        }

        return $order;
    }
protected function getOrderFromPayment ( $ orderPayment ) { $ orderId = null ; $ order = null ; if ( ! is_null ( $ orderPayment ) ) { $ orderId = $ orderPayment -> getOrderId ( ) ; } if ( ! is_null ( $ orderId ) ) { $ order = oxNew ( \ OxidEsales \ PayPalModule \ Model \ PayPalOrder :: class ) ; $ order -> setOrderId ( $ orderId ) ; $ order -> load ( ) ; } return $ order ; }
Load order by order id from order payment.

@param \OxidEsales\PayPalModule\Model\OrderPayment $orderPayment order payment to get order id.

@return \OxidEsales\PayPalModule\Model\PayPalOrder|null
Load order by order id from order payment .