I have paypal refresh token stored on my server. and i want to get the user basic info like profile email using that refresh token. but while trying to the get userinfo there are no such profile info.
$refreshToken = 'R23AAGKvPzMhDzJLohQ507s2NBBhP2lIS6m8BplqE_jEJpUGkiyjWEi-NJHC0omAh3n16N0x3_h4keLrANDFNOiLtWIho91Q5tpwqhRAJZJS4pYoOa9Psh4eYTIwdiIjcFVIMcDaaQPq1Ilb1R60w';
$tokenInfo = new OpenIdTokeninfo();
$tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token'=>
$refreshToken), $this->apiContext);
$params = array('access_token' => $tokenInfo->getAccessToken() );
$userInfo = OpenIdUserinfo::getUserinfo($params, $this->apiContext);
dd($userInfo);
the resulted output is this
OpenIdUserinfo {#319
-_propMap: array:1 [
"user_id" => "https://www.paypal.com/webapps/auth/identity/user/Lo-
Qp2vr2KOQrIz4OOhWaj6XLEOj2TumkUfAArGKvwM"
]
I have generated the refreshtoken from the authetication code generated from MOBILE SDK The transaction has to be done for Paypal Future Payment
The reference code used was https://github.com/paypal/PayPal-PHP-SDK/blob/master/sample/lipp/GetUserInfo.php