Model/IPNPaymentCreator.php
private function addRequestPaymentComment($paypalOrderPayment)
    {
        $request = $this->getRequest();
        $memo    = $request->getRequestParameter(self::PAYPAL_IPN_MEMO);

        if ($memo) {
            $comment = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentComment::class);
            $comment->setComment($memo);
            $paypalOrderPayment->addComment($comment);
            if (0 < $paypalOrderPayment->getId()) {
                $paypalOrderPayment->save();
            }
        }
        return $paypalOrderPayment;
    }
private function addRequestPaymentComment($paypalOrderPayment)
    {
        $request = $this->getRequest();
        $memo    = $request->getRequestParameter(self::PAYPAL_IPN_MEMO);

        if ($memo) {
            $comment = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentComment::class);
            $comment->setComment($memo);
            $paypalOrderPayment->addComment($comment);
            if (0 < $paypalOrderPayment->getId()) {
                $paypalOrderPayment->save();
            }
        }
        return $paypalOrderPayment;
    }
private function addRequestPaymentComment ( $ paypalOrderPayment ) { $ request = $ this -> getRequest ( ) ; $ memo = $ request -> getRequestParameter ( self :: PAYPAL_IPN_MEMO ) ; if ( $ memo ) { $ comment = oxNew ( \ OxidEsales \ PayPalModule \ Model \ OrderPaymentComment :: class ) ; $ comment -> setComment ( $ memo ) ; $ paypalOrderPayment -> addComment ( $ comment ) ; if ( 0 < $ paypalOrderPayment -> getId ( ) ) { $ paypalOrderPayment -> save ( ) ; } } return $ paypalOrderPayment ; }
Add comment for request payment if comment exists.
Function must only be called when the payment object this
comment is related to is already stored in the database and has an oxid.
Comment will be immediately saved to database.

@param  \OxidEsales\PayPalModule\Model\OrderPayment $paypalOrderPayment

@return \OxidEsales\PayPalModule\Model\OrderPayment
Add comment for request payment if comment exists . Function must only be called when the payment object this comment is related to is already stored in the database and has an oxid . Comment will be immediately saved to database .