Q:

PayPal PHP Rest SDK Buyers Address PPOpenIdAddress

I have been using the PHP Rest SDK, I have been able to login / logout and gather all the user information possible but if I change the scope to include 'address', or just leave the array empty so it defaults to the sdks defaults, I get the following error:
Fatal error: Class 'PPOpenIdAddress' not found in /Users//Sites//framework.**.dev/private/modules/paypal/vendor/paypal/sdk-core-php/lib/PayPal/Common/PPModel.php on line 51
If I remove the address field from the scope and then everything is running smooth.
Scope before adding address:
public function createLogin(){
    try {
        $_array = array('openid', 'email', 'profile', 'phone', 'https://uri.paypal.com/services/paypalattributes', 'https://uri.paypal.com/services/expresscheckout');
        return PPOpenIdSession::getAuthorizationUrl(PAYPALURL, $_array, $this->_clientid,  $this->getApiContext());
    } catch (PayPal\Exception\PPConnectionException $_exception) {
        $this->_errormsg = $_exception->getMessage();
        $this->_errordata = $_exception->getData();

        return false;
    }
}

Scope after adding address:
public function createLogin(){
    try {
        $_array = array('openid', 'email', 'profile', 'address', 'phone', 'https://uri.paypal.com/services/paypalattributes', 'https://uri.paypal.com/services/expresscheckout');
        return PPOpenIdSession::getAuthorizationUrl(PAYPALURL, $_array, $this->_clientid,  $this->getApiContext());
    } catch (PayPal\Exception\PPConnectionException $_exception) {
        $this->_errormsg = $_exception->getMessage();
        $this->_errordata = $_exception->getData();

        return false;
    }
}

not sure whats going wrong

A:

Found a solution. Seems that the implemented reflection here uses the PHPDOC to retrieve the class names. It was enough for me to locate the getter method getAddress() in PPOpenIdUserinfo.php. I changed the @return PPOpenIdAddress to  @return PayPal\Auth\Openid\PPOpenIdAddress, (I basically added the namespace alongside the class). I hope some of the experts in PayPal api can confirm this.

