Enabled Third Party Invoicing

This commit is contained in:
Jay Patel
2016-05-25 12:30:20 -05:00
parent 763df655d8
commit 56f1be3c73
5 changed files with 152 additions and 13 deletions

View File

@@ -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);
}
}