Model/User.php
public function initializeUserForCallBackPayPalUser($payPalData)
    {
        // setting mode..
        $this->callBackUser = true;

        // setting data..
        $street = $this->splitShipToStreetPayPalUser($payPalData['SHIPTOSTREET']);

        // setting object id as it is requested later while processing user object
        $this->setId(\OxidEsales\Eshop\Core\UtilsObject::getInstance()->generateUID());

        $this->oxuser__oxstreet = new \OxidEsales\Eshop\Core\Field($street['street']);
        $this->oxuser__oxstreetnr = new \OxidEsales\Eshop\Core\Field($street['streetnr']);
        $this->oxuser__oxcity = new \OxidEsales\Eshop\Core\Field($payPalData['SHIPTOCITY']);
        $this->oxuser__oxzip = new \OxidEsales\Eshop\Core\Field($payPalData['SHIPTOZIP']);

        $country = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
        $countryId = $country->getIdByCode($payPalData["SHIPTOCOUNTRY"]);
        $this->oxuser__oxcountryid = new \OxidEsales\Eshop\Core\Field($countryId);

        $stateId = '';
        if (isset($payPalData["SHIPTOSTATE"])) {
            $state = oxNew(\OxidEsales\Eshop\Application\Model\State::class);
            $stateId = $state->getIdByCode($payPalData["SHIPTOSTATE"], $countryId);
        }
        $this->oxuser__oxstateid = new \OxidEsales\Eshop\Core\Field($stateId);
    }
public function initializeUserForCallBackPayPalUser($payPalData)
    {
        // setting mode..
        $this->callBackUser = true;

        // setting data..
        $street = $this->splitShipToStreetPayPalUser($payPalData['SHIPTOSTREET']);

        // setting object id as it is requested later while processing user object
        $this->setId(\OxidEsales\Eshop\Core\UtilsObject::getInstance()->generateUID());

        $this->oxuser__oxstreet = new \OxidEsales\Eshop\Core\Field($street['street']);
        $this->oxuser__oxstreetnr = new \OxidEsales\Eshop\Core\Field($street['streetnr']);
        $this->oxuser__oxcity = new \OxidEsales\Eshop\Core\Field($payPalData['SHIPTOCITY']);
        $this->oxuser__oxzip = new \OxidEsales\Eshop\Core\Field($payPalData['SHIPTOZIP']);

        $country = oxNew(\OxidEsales\Eshop\Application\Model\Country::class);
        $countryId = $country->getIdByCode($payPalData["SHIPTOCOUNTRY"]);
        $this->oxuser__oxcountryid = new \OxidEsales\Eshop\Core\Field($countryId);

        $stateId = '';
        if (isset($payPalData["SHIPTOSTATE"])) {
            $state = oxNew(\OxidEsales\Eshop\Application\Model\State::class);
            $stateId = $state->getIdByCode($payPalData["SHIPTOSTATE"], $countryId);
        }
        $this->oxuser__oxstateid = new \OxidEsales\Eshop\Core\Field($stateId);
    }
public function initializeUserForCallBackPayPalUser ( $ payPalData ) { // setting mode.. $ this -> callBackUser = true ; // setting data.. $ street = $ this -> splitShipToStreetPayPalUser ( $ payPalData [ 'SHIPTOSTREET' ] ) ; // setting object id as it is requested later while processing user object $ this -> setId ( \ OxidEsales \ Eshop \ Core \ UtilsObject :: getInstance ( ) -> generateUID ( ) ) ; $ this -> oxuser__oxstreet = new \ OxidEsales \ Eshop \ Core \ Field ( $ street [ 'street' ] ) ; $ this -> oxuser__oxstreetnr = new \ OxidEsales \ Eshop \ Core \ Field ( $ street [ 'streetnr' ] ) ; $ this -> oxuser__oxcity = new \ OxidEsales \ Eshop \ Core \ Field ( $ payPalData [ 'SHIPTOCITY' ] ) ; $ this -> oxuser__oxzip = new \ OxidEsales \ Eshop \ Core \ Field ( $ payPalData [ 'SHIPTOZIP' ] ) ; $ country = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Country :: class ) ; $ countryId = $ country -> getIdByCode ( $ payPalData [ "SHIPTOCOUNTRY" ] ) ; $ this -> oxuser__oxcountryid = new \ OxidEsales \ Eshop \ Core \ Field ( $ countryId ) ; $ stateId = '' ; if ( isset ( $ payPalData [ "SHIPTOSTATE" ] ) ) { $ state = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ State :: class ) ; $ stateId = $ state -> getIdByCode ( $ payPalData [ "SHIPTOSTATE" ] , $ countryId ) ; } $ this -> oxuser__oxstateid = new \ OxidEsales \ Eshop \ Core \ Field ( $ stateId ) ; }
Initializes call back user.

@param array $payPalData Callback user data.
Initializes call back user .