Last active
December 26, 2015 08:38
-
-
Save IntuitDeveloperRelations/7123263 to your computer and use it in GitHub Desktop.
IPP PHP SDK v3 - Platform - Disconnect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('../config.php'); | |
require_once(PATH_SDK_ROOT . 'Core/ServiceContext.php'); | |
require_once(PATH_SDK_ROOT . 'PlatformService/PlatformService.php'); | |
require_once(PATH_SDK_ROOT . 'Utility/Configuration/ConfigurationManager.php'); | |
// Tell us whether to use your QBO vs QBD settings, from App.config | |
$serviceType = IntuitServicesType::QBD; | |
// Get App Config | |
$realmId = ConfigurationManager::AppSettings('RealmID'); | |
if (!$realmId) | |
exit("Please add realm to App.Config before running this sample.\n"); | |
// Prep Service Context | |
$requestValidator = new OAuthRequestValidator(ConfigurationManager::AppSettings('AccessToken'), | |
ConfigurationManager::AppSettings('AccessTokenSecret'), | |
ConfigurationManager::AppSettings('ConsumerKey'), | |
ConfigurationManager::AppSettings('ConsumerSecret')); | |
$serviceContext = new ServiceContext($realmId, $serviceType, $requestValidator); | |
if (!$serviceContext) | |
exit("Problem while initializing ServiceContext.\n"); | |
// Prep Platform Services | |
$platformService = new PlatformService($serviceContext); | |
// Call Disconnect | |
$platformService->Disconnect(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment