public function handleOrderPayment($requestOrderPayment)
    {
        $return = null;

        $authId              = $this->getRequest()->getRequestParameter(self::PAYPAL_IPN_AUTH_ID);
        $transactionEntity   = $this->getRequest()->getRequestParameter(self::PAYPAL_IPN_TRANSACTION_ENTITY);
        $parentTransactionId = $this->getRequest()->getRequestParameter(self::PAYPAL_IPN_PARENT_TRANSACTION_ID);

        $orderPaymentAuthorization = $this->loadOrderPayment($authId);
        $orderPaymentParent        = $this->loadOrderPayment($parentTransactionId);
        $orderId                   = $orderPaymentParent->getOrderId();

        if ((self::HANDLE_TRANSACTION_ENTITY == $transactionEntity) && $orderId) {
            $requestOrderPayment->setOrderId($orderId);
            $requestOrderPayment->save();
            $requestOrderPayment = $this->addRequestPaymentComment($requestOrderPayment);

            if (\OxidEsales\PayPalModule\Model\IPNRequestPaymentSetter::REFUND_ACTION == $requestOrderPayment->getAction()) {
                $this->updateParentTransactionRefundAmount($orderPaymentParent, $requestOrderPayment->getAmount());
            }
            if ((\OxidEsales\PayPalModule\Model\IPNRequestPaymentSetter::AUTHORIZATION_ACTION == $orderPaymentAuthorization->getAction())
                && ($orderId == $orderPaymentAuthorization->getOrderId())
            ) {
                $this->updateOrderPaymentAuthorizationStatus($orderPaymentAuthorization);
            }
            $return = $requestOrderPayment;
        }

        return $return;
    }