{"action":"created","issue":{"url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/105","labels_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/105/comments","events_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/105/events","html_url":"https://github.com/bigcommerce/bigcommerce-api-php/issues/105","id":37249706,"number":105,"title":"createSku not working","user":{"login":"masaok","id":1320083,"avatar_url":"https://avatars.githubusercontent.com/u/1320083?v=3","gravatar_id":"","url":"https://api.github.com/users/masaok","html_url":"https://github.com/masaok","followers_url":"https://api.github.com/users/masaok/followers","following_url":"https://api.github.com/users/masaok/following{/other_user}","gists_url":"https://api.github.com/users/masaok/gists{/gist_id}","starred_url":"https://api.github.com/users/masaok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaok/subscriptions","organizations_url":"https://api.github.com/users/masaok/orgs","repos_url":"https://api.github.com/users/masaok/repos","events_url":"https://api.github.com/users/masaok/events{/privacy}","received_events_url":"https://api.github.com/users/masaok/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"aleachjr","id":3844269,"avatar_url":"https://avatars.githubusercontent.com/u/3844269?v=3","gravatar_id":"","url":"https://api.github.com/users/aleachjr","html_url":"https://github.com/aleachjr","followers_url":"https://api.github.com/users/aleachjr/followers","following_url":"https://api.github.com/users/aleachjr/following{/other_user}","gists_url":"https://api.github.com/users/aleachjr/gists{/gist_id}","starred_url":"https://api.github.com/users/aleachjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleachjr/subscriptions","organizations_url":"https://api.github.com/users/aleachjr/orgs","repos_url":"https://api.github.com/users/aleachjr/repos","events_url":"https://api.github.com/users/aleachjr/events{/privacy}","received_events_url":"https://api.github.com/users/aleachjr/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2014-07-07T08:49:35Z","updated_at":"2015-02-21T20:59:42Z","closed_at":"2015-02-17T19:22:48Z","body":"I've tried both the static createSku and Sku->create() methods, but they both hang.\r\n\r\nFirst, I modified Connection.php to print some debug output:\r\n```\r\n        curl_setopt($this->curl, CURLOPT_VERBOSE, true);\r\n        curl_setopt($this->curl, CURLOPT_FAILONERROR, true);\r\nprint \"CURL EXEC now...\\n\";\r\n        curl_exec($this->curl);\r\nprint \"CURL EXEC OK...\\n\";\r\n```\r\n\r\nHere's the output...\r\n```\r\nCURL EXEC NOW...\r\n* Found bundle for host www.myhost.com: 0x2a388f0\r\n* Re-using existing connection! (#0) with host www.myhost.com\r\n* Connected to www.myhost.com (192.200.171.10) port 443 (#0)\r\n* Server auth using Basic with user 'api'\r\n> POST /api/v2/products/244/skus HTTP/1.1\r\nAuthorization: Basic BLAHBLAHBLAH=\r\nHost: www.myhost.com\r\nAccept: application/json\r\nContent-Type: application/json\r\nContent-Length: 181\r\nExpect: 100-continue\r\n\r\n< HTTP/1.1 100 Continue   ### hangs here for about 30 seconds, then...\r\n* Empty reply from server\r\n* Connection #0 to host www.myhost.com left intact\r\nCURL EXEC DONE\r\n```\r\n\r\nAnyone else having this problem?  Can anyone create SKUs successfully?"},"comment":{"url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/comments/75392624","html_url":"https://github.com/bigcommerce/bigcommerce-api-php/issues/105#issuecomment-75392624","issue_url":"https://api.github.com/repos/bigcommerce/bigcommerce-api-php/issues/105","id":75392624,"user":{"login":"mullinsr","id":7979597,"avatar_url":"https://avatars.githubusercontent.com/u/7979597?v=3","gravatar_id":"","url":"https://api.github.com/users/mullinsr","html_url":"https://github.com/mullinsr","followers_url":"https://api.github.com/users/mullinsr/followers","following_url":"https://api.github.com/users/mullinsr/following{/other_user}","gists_url":"https://api.github.com/users/mullinsr/gists{/gist_id}","starred_url":"https://api.github.com/users/mullinsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mullinsr/subscriptions","organizations_url":"https://api.github.com/users/mullinsr/orgs","repos_url":"https://api.github.com/users/mullinsr/repos","events_url":"https://api.github.com/users/mullinsr/events{/privacy}","received_events_url":"https://api.github.com/users/mullinsr/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T20:59:42Z","updated_at":"2015-02-21T20:59:42Z","body":"Have you tried using just the generic method?\r\n```\r\n$newSku = array(\r\n    'sku' => '12345', //required\r\n    'options' => array( //also required\r\n        'product_option_id' => '25',\r\n        'option_value_id' => '12'\r\n        )\r\n    );\r\nBigcommerce::createResource('/products/{product_id}/skus', $newSku);\r\n```\r\nhttps://developer.bigcommerce.com/api/stores/v2/products/skus#create-a-product-sku\r\nAlso, try calling `print_r(Bigcommerce::getLastError());` to get a response from BC. \r\n\r\nLet me know if that works, I just wrote it on the fly\r\n"}}