/**
  * @param GetResponseEvent $event
  * @throws FailedRequestException
  */
 protected function interceptOAuthStep2(GetResponseEvent $event)
 {
     $request = $event->getRequest();
     $authCode = $request->get('code');
     $storeName = $request->get('shop');
     $params = array('body' => array('client_id' => $this->config['credentials']['api_key'], 'client_secret' => $this->config['credentials']['shared_secret'], 'code' => $authCode));
     $apiRequest = $this->shopifyClient->http()->createRequest('POST', 'https://' . $storeName . '/admin/oauth/access_token', $params);
     $response = $this->shopifyClient->http()->send($apiRequest);
     if ($response->getStatusCode() != 200) {
         throw new FailedRequestException((string) $response);
     }
     $request->attributes->set('access_token', $response->json(array('object' => true))->access_token);
 }