Model/Address.php
protected function existPayPalAddress($addressData)
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $query = "SELECT `oxid` FROM `oxaddress` WHERE 1 ";
        $query .= " AND `oxfname` = " . $db->quote($addressData['oxfname']);
        $query .= " AND `oxlname` = " . $db->quote($addressData['oxlname']);
        $query .= " AND `oxstreet` = " . $db->quote($addressData['oxstreet']);
        $query .= " AND `oxstreetnr` = " . $db->quote($addressData['oxstreetnr']);
        $query .= " AND `oxcity` = " . $db->quote($addressData['oxcity']);
        $query .= " AND `oxcountryid` = " . $db->quote($addressData['oxcountryid']);
        $query .= " AND `oxstateid` = " . $db->quote($addressData['oxstateid']);
        $query .= " AND `oxzip` = " . $db->quote($addressData['oxzip']);
        $query .= " AND `oxfon` = " . $db->quote($addressData['oxfon']);

        if ($addressId = $db->getOne($query)) {
            return $addressId;
        }

        return false;
    }
protected function existPayPalAddress($addressData)
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $query = "SELECT `oxid` FROM `oxaddress` WHERE 1 ";
        $query .= " AND `oxfname` = " . $db->quote($addressData['oxfname']);
        $query .= " AND `oxlname` = " . $db->quote($addressData['oxlname']);
        $query .= " AND `oxstreet` = " . $db->quote($addressData['oxstreet']);
        $query .= " AND `oxstreetnr` = " . $db->quote($addressData['oxstreetnr']);
        $query .= " AND `oxcity` = " . $db->quote($addressData['oxcity']);
        $query .= " AND `oxcountryid` = " . $db->quote($addressData['oxcountryid']);
        $query .= " AND `oxstateid` = " . $db->quote($addressData['oxstateid']);
        $query .= " AND `oxzip` = " . $db->quote($addressData['oxzip']);
        $query .= " AND `oxfon` = " . $db->quote($addressData['oxfon']);

        if ($addressId = $db->getOne($query)) {
            return $addressId;
        }

        return false;
    }
protected function existPayPalAddress ( $ addressData ) { $ db = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ query = "SELECT `oxid` FROM `oxaddress` WHERE 1 " ; $ query .= " AND `oxfname` = " . $ db -> quote ( $ addressData [ 'oxfname' ] ) ; $ query .= " AND `oxlname` = " . $ db -> quote ( $ addressData [ 'oxlname' ] ) ; $ query .= " AND `oxstreet` = " . $ db -> quote ( $ addressData [ 'oxstreet' ] ) ; $ query .= " AND `oxstreetnr` = " . $ db -> quote ( $ addressData [ 'oxstreetnr' ] ) ; $ query .= " AND `oxcity` = " . $ db -> quote ( $ addressData [ 'oxcity' ] ) ; $ query .= " AND `oxcountryid` = " . $ db -> quote ( $ addressData [ 'oxcountryid' ] ) ; $ query .= " AND `oxstateid` = " . $ db -> quote ( $ addressData [ 'oxstateid' ] ) ; $ query .= " AND `oxzip` = " . $ db -> quote ( $ addressData [ 'oxzip' ] ) ; $ query .= " AND `oxfon` = " . $ db -> quote ( $ addressData [ 'oxfon' ] ) ; if ( $ addressId = $ db -> getOne ( $ query ) ) { return $ addressId ; } return false ; }
Checks if exists PayPal address.

@param array $addressData

@return bool|string
Checks if exists PayPal address .