function getStart($method = 'shopify', $shop = '', $id = 0) { $api = $this->integrationMethods->getMethodClass($method); $api->prepareAuth(); \Session::put('integration_id', $id); return \Redirect::away($api->generateAuthUrl($shop)); }
/** * Execute the job. * * @return void */ public function handle() { if ($this->job->attempts() > 5) { // todo: tell user to re-attempt and set status of integration to failed. $this->job->delete(); } $api = $this->integrationMethods->getMethodClass($this->method); if ($token = $this->integrationMethods->getAuthToken($api)) { // todo: set site auth token = $token // todo: set status of store // $this->storeId return true; } $this->job->release(15); }