PayPal\Common\PayPalResourceModel::updateAccessToken PHP Method

updateAccessToken() public method

Updates Access Token using long lived refresh token
public updateAccessToken ( string | null $refreshToken, ApiContext $apiContext ) : void
$refreshToken string | null
$apiContext PayPal\Rest\ApiContext
return void
    public function updateAccessToken($refreshToken, $apiContext)
    {
        $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
        $apiContext->getCredential()->updateAccessToken($apiContext->getConfig(), $refreshToken);
    }