source/Application/Model/UserPayment.php
public function getPaymentByPaymentType($oUser = null, $sPaymentType = null)
    {
        $blGet = false;
        if ($oUser && $sPaymentType != null) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = 'select oxpaymentid from oxorder where oxpaymenttype=' . $oDb->quote($sPaymentType) . ' and
                    oxuserid=' . $oDb->quote($oUser->getId()) . ' order by oxorderdate desc';
            if (($sOxId = $oDb->getOne($sQ))) {
                $blGet = $this->load($sOxId);
            }
        }

        return $blGet;
    }
public function getPaymentByPaymentType($oUser = null, $sPaymentType = null)
    {
        $blGet = false;
        if ($oUser && $sPaymentType != null) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = 'select oxpaymentid from oxorder where oxpaymenttype=' . $oDb->quote($sPaymentType) . ' and
                    oxuserid=' . $oDb->quote($oUser->getId()) . ' order by oxorderdate desc';
            if (($sOxId = $oDb->getOne($sQ))) {
                $blGet = $this->load($sOxId);
            }
        }

        return $blGet;
    }
public function getPaymentByPaymentType ( $ oUser = null , $ sPaymentType = null ) { $ blGet = false ; if ( $ oUser && $ sPaymentType != null ) { $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ sQ = 'select oxpaymentid from oxorder where oxpaymenttype=' . $ oDb -> quote ( $ sPaymentType ) . ' and
                    oxuserid=' . $ oDb -> quote ( $ oUser -> getId ( ) ) . ' order by oxorderdate desc' ; if ( ( $ sOxId = $ oDb -> getOne ( $ sQ ) ) ) { $ blGet = $ this -> load ( $ sOxId ) ; } } return $ blGet ; }
Get user payment by payment id

@param \OxidEsales\Eshop\Application\Model\User $oUser        user object
@param string                                   $sPaymentType payment type

@return bool
Get user payment by payment id