init() ->auth(); } private function init(): self { $this->sdk = DataService::Configure([ 'ClientID' => config('services.quickbooks.client_id'), 'ClientSecret' => config('services.quickbooks.client_secret'), 'auth_mode' => 'oauth2', 'scope' => "com.intuit.quickbooks.accounting", 'RedirectURI' => 'https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl', // 'RedirectURI' => route('quickbooks.authorized'), ]); // if (env('APP_DEBUG')) { // $sdk->setLogLocation(storage_path("logs/quickbooks.log")); // $sdk->enableLog(); // } $this->sdk->setMinorVersion("73"); $this->sdk->throwExceptionOnError(true); return $this; } private function auth(): self { $wrapper = new SdkWrapper($this->sdk); $this->auth = new Auth($wrapper); return $this; } public function getSdk(): DataService { return $this->sdk; } public function getAuth(): Auth { return $this->auth; } }