source/Application/Controller/Admin/UserPayment.php
public function getSelUserPayment()
    {
        if ($this->_oUserPayment == null) {
            $this->_oUserPayment = false;
            $sPaymentId = $this->getPaymentId();
            if ($sPaymentId != "-1" && isset($sPaymentId)) {
                $this->_oUserPayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
                $this->_oUserPayment->load($sPaymentId);
                $sTemplate = $this->_oUserPayment->oxuserpayments__oxvalue->value;

                // generate selected paymenttype
                $oPaymentTypes = $this->getPaymentTypes();
                foreach ($oPaymentTypes as $oPayment) {
                    if ($oPayment->oxpayments__oxid->value == $this->_oUserPayment->oxuserpayments__oxpaymentsid->value) {
                        $oPayment->selected = 1;
                        // if there are no values assigned we set default from paymenttype
                        if (!$sTemplate) {
                            $sTemplate = $oPayment->oxpayments__oxvaldesc->value;
                        }
                        break;
                    }
                }
                $this->_oUserPayment->setDynValues(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($sTemplate));
            }
        }

        return $this->_oUserPayment;
    }
public function getSelUserPayment()
    {
        if ($this->_oUserPayment == null) {
            $this->_oUserPayment = false;
            $sPaymentId = $this->getPaymentId();
            if ($sPaymentId != "-1" && isset($sPaymentId)) {
                $this->_oUserPayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
                $this->_oUserPayment->load($sPaymentId);
                $sTemplate = $this->_oUserPayment->oxuserpayments__oxvalue->value;

                // generate selected paymenttype
                $oPaymentTypes = $this->getPaymentTypes();
                foreach ($oPaymentTypes as $oPayment) {
                    if ($oPayment->oxpayments__oxid->value == $this->_oUserPayment->oxuserpayments__oxpaymentsid->value) {
                        $oPayment->selected = 1;
                        // if there are no values assigned we set default from paymenttype
                        if (!$sTemplate) {
                            $sTemplate = $oPayment->oxpayments__oxvaldesc->value;
                        }
                        break;
                    }
                }
                $this->_oUserPayment->setDynValues(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($sTemplate));
            }
        }

        return $this->_oUserPayment;
    }
public function getSelUserPayment ( ) { if ( $ this -> _oUserPayment == null ) { $ this -> _oUserPayment = false ; $ sPaymentId = $ this -> getPaymentId ( ) ; if ( $ sPaymentId != "-1" && isset ( $ sPaymentId ) ) { $ this -> _oUserPayment = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ UserPayment :: class ) ; $ this -> _oUserPayment -> load ( $ sPaymentId ) ; $ sTemplate = $ this -> _oUserPayment -> oxuserpayments__oxvalue -> value ; // generate selected paymenttype $ oPaymentTypes = $ this -> getPaymentTypes ( ) ; foreach ( $ oPaymentTypes as $ oPayment ) { if ( $ oPayment -> oxpayments__oxid -> value == $ this -> _oUserPayment -> oxuserpayments__oxpaymentsid -> value ) { $ oPayment -> selected = 1 ; // if there are no values assigned we set default from paymenttype if ( ! $ sTemplate ) { $ sTemplate = $ oPayment -> oxpayments__oxvaldesc -> value ; } break ; } } $ this -> _oUserPayment -> setDynValues ( \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> assignValuesFromText ( $ sTemplate ) ) ; } } return $ this -> _oUserPayment ; }
Returns selected Payment

@return object
Returns selected Payment