@@ -70,12 +70,12 @@ discard block |
||
| 70 | 70 | 'shopify_shop_domain_'.$this->ShopifyAPI->api_key => $this->ShopifyAPI->getShopDomain() |
| 71 | 71 | ]); |
| 72 | 72 | |
| 73 | - $this->Auth->setUser($shop_entity); |
|
| 73 | + $this->Auth->setUser($shop_entity); |
|
| 74 | 74 | |
| 75 | 75 | return $this->redirect([ |
| 76 | 76 | 'controller' => 'Shopify', |
| 77 | 77 | 'plugin' => false, |
| 78 | - 'api_key' => $this->ShopifyAPI->api_key]); |
|
| 78 | + 'api_key' => $this->ShopifyAPI->api_key]); |
|
| 79 | 79 | |
| 80 | 80 | |
| 81 | 81 | } else { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $this->render('add'); |
| 111 | 111 | |
| 112 | - } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 112 | + } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 113 | 113 | |
| 114 | 114 | $valid_domain = $this->ShopifyAPI->validDomain( |
| 115 | 115 | $this->request->data['shop_domain'] |
@@ -40,17 +40,17 @@ |
||
| 40 | 40 | |
| 41 | 41 | if (empty($this->api_key)) { |
| 42 | 42 | |
| 43 | - $controller = $this->_registry->getController(); |
|
| 43 | + $controller = $this->_registry->getController(); |
|
| 44 | 44 | |
| 45 | - if (isset($controller->request->api_key)) { |
|
| 45 | + if (isset($controller->request->api_key)) { |
|
| 46 | 46 | $this->api_key = $controller->request->api_key; |
| 47 | - } |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $this->ShopifyAPI = $registry->load('Multidimensional/Shopify.ShopifyAPI', [ |
| 52 | 52 | 'api_key' => $this->api_key |
| 53 | - ]); |
|
| 53 | + ]); |
|
| 54 | 54 | |
| 55 | 55 | $this->ShopifyDatabase = $registry->load('Multidimensional/Shopify.ShopifyDatabase'); |
| 56 | 56 | } |
@@ -41,26 +41,26 @@ |
||
| 41 | 41 | |
| 42 | 42 | parent::initialize($config); |
| 43 | 43 | |
| 44 | - $this->api_key = isset($config['api_key']) ? $config['api_key'] : ''; |
|
| 44 | + $this->api_key = isset($config['api_key']) ? $config['api_key'] : ''; |
|
| 45 | 45 | |
| 46 | - if (!empty($this->api_key)) { |
|
| 46 | + if (!empty($this->api_key)) { |
|
| 47 | 47 | |
| 48 | 48 | $this->shared_secret = Configure::read('Multidimensional/Shopify.' . $this->api_key . '.shared_secret'); |
| 49 | 49 | $this->scope = Configure::read('Multidimensional/Shopify.' . $this->api_key . '.scope'); |
| 50 | 50 | $this->is_private_app = Configure::read('Multidimensional/Shopify.' . $this->api_key . '.is_private_app'); |
| 51 | 51 | $this->private_app_password = Configure::read('Multidimensional/Shopify.' . $this->api_key . '.private_app_password'); |
| 52 | 52 | |
| 53 | - } else { |
|
| 53 | + } else { |
|
| 54 | 54 | |
| 55 | 55 | throw new NotImplementedException(__('Shopify API key not found')); |
| 56 | 56 | |
| 57 | - } |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | - if (!$this->shared_secret) { |
|
| 59 | + if (!$this->shared_secret) { |
|
| 60 | 60 | |
| 61 | 61 | throw new NotImplementedException(__('Shopify shared secret not found')); |
| 62 | 62 | |
| 63 | - } |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | 65 | } |
| 66 | 66 | |