@@ -66,6 +66,10 @@ discard block |
||
| 66 | 66 | return $this->callLimit() - $this->callsMade(); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | + /** |
|
| 70 | + * @param string $method |
|
| 71 | + * @param string $path |
|
| 72 | + */ |
|
| 69 | 73 | public function call($method, $path, $params=array()) { |
| 70 | 74 | |
| 71 | 75 | if (!$this->_isReady()) { |
@@ -94,6 +98,9 @@ discard block |
||
| 94 | 98 | |
| 95 | 99 | } |
| 96 | 100 | |
| 101 | + /** |
|
| 102 | + * @param integer $index |
|
| 103 | + */ |
|
| 97 | 104 | private function shopApiCallLimitParam($index) { |
| 98 | 105 | $params = explode("/",$this->response->getHeaderLine('http_x_shopify_shop_api_call_limit')); |
| 99 | 106 | return (int) $params[$index]; |
@@ -179,6 +186,9 @@ discard block |
||
| 179 | 186 | |
| 180 | 187 | } |
| 181 | 188 | |
| 189 | + /** |
|
| 190 | + * @param string $url |
|
| 191 | + */ |
|
| 182 | 192 | private function _urlEncode($url) { |
| 183 | 193 | |
| 184 | 194 | $url = str_replace('&', '%26', $url); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $this->api_key = ((isset($config['api_key'])) ? $config['api_key'] : Configure::read('Shopify.api_key')); |
| 38 | 38 | $this->shared_secret = ((isset($config['shared_secret'])) ? $config['shared_secret'] : Configure::read('Shopify.shared_secret')); |
| 39 | 39 | $this->scope = ((isset($config['scope'])) ? $config['scope'] : Configure::read('Shopify.scope')); |
| 40 | - $this->is_private_app = ((isset($config['is_private_app'])) ? $config['is_private_app'] : Configure::read('Shopify.is_private_app')); |
|
| 40 | + $this->is_private_app = ((isset($config['is_private_app'])) ? $config['is_private_app'] : Configure::read('Shopify.is_private_app')); |
|
| 41 | 41 | $this->private_app_password = ((isset($config['private_app_password'])) ? $config['private_app_password'] : Configure::read('Shopify.private_app_password')); |
| 42 | 42 | |
| 43 | 43 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | return false; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - } |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | 135 | public function setNonce($shop_domain) { |
| 136 | 136 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $string = implode("&", $dataString); |
| 178 | 178 | return $query['hmac'] == hash_hmac('sha256', $string, $this->shared_secret); |
| 179 | 179 | |
| 180 | - } |
|
| 180 | + } |
|
| 181 | 181 | |
| 182 | 182 | private function _urlEncode($url) { |
| 183 | 183 | |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | |
| 109 | 109 | $this->render('validate'); |
| 110 | 110 | |
| 111 | - } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 111 | + } elseif (!empty($this->request->data['shop_domain']) && !$this->error) { |
|
| 112 | 112 | |
| 113 | 113 | $valid_domain = $this->ShopifyAPI->validDomain( |
| 114 | 114 | $this->request->data['shop_domain'] |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * Initialize AppController |
| 25 | 25 | * |
| 26 | 26 | * @return void |
| 27 | - */ |
|
| 27 | + */ |
|
| 28 | 28 | public function initialize() |
| 29 | 29 | { |
| 30 | 30 | parent::initialize(); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | class ShopifyInstallShell extends Shell { |
| 25 | 25 | |
| 26 | - public function main() { |
|
| 26 | + public function main() { |
|
| 27 | 27 | |
| 28 | 28 | //Lets Make This FANCY |
| 29 | 29 | $this->clear(); |