Model/Service/CallbackService.php
private function getAssociatedOrder() {
        $orderId    = $this->gatewayResponse['response']['message']['trackId'];
        $order      = $this->orderFactory->create()->loadByIncrementId($orderId);

        if($order->isEmpty()) {
            throw new DomainException('The order does not exists.');
        }

        return $order;
    }
private function getAssociatedOrder() {
        $orderId    = $this->gatewayResponse['response']['message']['trackId'];
        $order      = $this->orderFactory->create()->loadByIncrementId($orderId);

        if($order->isEmpty()) {
            throw new DomainException('The order does not exists.');
        }

        return $order;
    }
private function getAssociatedOrder ( ) { $ orderId = $ this -> gatewayResponse [ 'response' ] [ 'message' ] [ 'trackId' ] ; $ order = $ this -> orderFactory -> create ( ) -> loadByIncrementId ( $ orderId ) ; if ( $ order -> isEmpty ( ) ) { throw new DomainException ( 'The order does not exists.' ) ; } return $ order ; }
Returns the order instance.

@return \Magento\Sales\Model\Order
@throws DomainException
Returns the order instance .