forked from LiveCarta/PayPal-PHP-SDK
Enabled Third Party Invoicing
This commit is contained in:
@@ -102,4 +102,17 @@ class PayPalResourceModel extends PayPalModel implements IResource
|
||||
$json = $restCall->execute($handlers, $url, $method, $payLoad, $headers);
|
||||
return $json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates Access Token using long lived refresh token
|
||||
*
|
||||
* @param string|null $refreshToken
|
||||
* @param ApiContext $apiContext
|
||||
* @return void
|
||||
*/
|
||||
public function updateAccessToken($refreshToken, $apiContext)
|
||||
{
|
||||
$apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
|
||||
$apiContext->getCredential()->updateAccessToken($apiContext->getConfig(), $refreshToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user