{"action":"created","issue":{"url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/69","repository_url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php","labels_url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/69/comments","events_url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/69/events","html_url":"https://github.com/hotelbeds-sdk/hotel-api-sdk-php/issues/69","id":199499566,"number":69,"title":"curl hotel details return always blank","user":{"login":"bunwanli","id":12594149,"avatar_url":"https://avatars.githubusercontent.com/u/12594149?v=3","gravatar_id":"","url":"https://api.github.com/users/bunwanli","html_url":"https://github.com/bunwanli","followers_url":"https://api.github.com/users/bunwanli/followers","following_url":"https://api.github.com/users/bunwanli/following{/other_user}","gists_url":"https://api.github.com/users/bunwanli/gists{/gist_id}","starred_url":"https://api.github.com/users/bunwanli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunwanli/subscriptions","organizations_url":"https://api.github.com/users/bunwanli/orgs","repos_url":"https://api.github.com/users/bunwanli/repos","events_url":"https://api.github.com/users/bunwanli/events{/privacy}","received_events_url":"https://api.github.com/users/bunwanli/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-09T08:33:59Z","updated_at":"2017-01-10T02:57:26Z","closed_at":"2017-01-10T02:57:26Z","body":"I want to tell you I don’t use your sdk library and use my own code.\r\nXml code I use is from your sandbox. It run smooth at sandbox but not in my code\r\nI want to try get available list hotels but It always return blank\r\n\r\nmy source code \r\n\r\n$key = \"9u***********\";\r\n                                $secret = \"yM**********\";\r\n                                $signature = hash(\"sha256\", $key.$secret.time());\r\n                                $url = 'https://api.test.hotelbeds.com/hotel-api/1.0/hotels';\r\n                                $httpHeader = array(\r\n                                                \"Api-Key: \".$key,\r\n                                                \"X-Signature: \".$signature,\r\n            \"Accept: application/xml\",\r\n                                                \"Accept-Charset : utf-8\",\r\n                                                \"Accept-Enconding : gzip, deflate\",\r\n                                                \"Content-Type : application/xml\"\r\n        );\r\n`$requestData2 = '<availabilityRQ xmlns=\"http://www.hotelbeds.com/schemas/messages\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" >\r\n                                                                                                <stay checkIn=\"2017-06-15\" checkOut=\"2017-06-20\" shiftDays=\"2\"/>\r\n                                                                                                <occupancies>\r\n                                                                                                                <occupancy rooms=\"1\" adults=\"2\" children=\"1\">\r\n                                                                                                                                <paxes>\r\n                                                                                                                                                <pax type=\"AD\"/>\r\n                                                                                                                                                <pax type=\"AD\"/>\r\n                                                                                                                                                <pax type=\"CH\" age=\"8\"/>\r\n                                                                                                                                </paxes>\r\n                                                                                                                </occupancy>\r\n                                                                                                </occupancies>\r\n                                                                                                <hotels>\r\n                                                                                                                <hotel>1067</hotel>\r\n                                                                                                                <hotel>1070</hotel>\r\n                                                                                                                <hotel>1075</hotel>\r\n                                                                                                                <hotel>135813</hotel>\r\n                                                                                                                <hotel>145214</hotel>\r\n                                                                                                                <hotel>1506</hotel>\r\n                                                                                                                <hotel>1508</hotel>\r\n                                                                                                                <hotel>1526</hotel>\r\n                                                                                                                <hotel>1533</hotel>\r\n                                                                                                                <hotel>1539</hotel>\r\n                                                                                                                <hotel>1550</hotel>\r\n                                                                                                                <hotel>161032</hotel>\r\n                                                                                                                <hotel>170542</hotel>\r\n                                                                                                                <hotel>182125</hotel>\r\n                                                                                                                <hotel>187939</hotel>\r\n                                                                                                                <hotel>212167</hotel>\r\n                                                                                                                <hotel>215417</hotel>\r\n                                                                                                                <hotel>228671</hotel>\r\n                                                                                                                <hotel>229318</hotel>\r\n                                                                                                                <hotel>23476</hotel>\r\n                                                                                                </hotels>\r\n                                                                                </availabilityRQ>';`\r\n                                \r\n                                \r\n                                $curl = curl_init();\r\n                                \r\n                                curl_setopt_array($curl, array(\r\n                                                CURLOPT_RETURNTRANSFER => 1,\r\n                                                CURLOPT_URL => $url,\r\n                                                CURLOPT_HTTPHEADER => $httpHeader,\r\n                                                CURLOPT_SSL_VERIFYPEER => false,\r\n                                                CURLOPT_POSTFIELDS => $requestData2,\r\n                                                CURLOPT_POST => 1,\r\n                                                CURLOPT_ENCODING => \"gzip\",\r\n                                ));\r\n                                $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n                                $curl_errno= curl_errno($curl);\r\n                                $resp = curl_exec($curl);\r\n                                \r\n                                if($curl_errno!=0)\r\n                                echo $curl_errno;\r\n                                \r\n                                if ($httpcode != 200) {  \r\n                                   echo \"KO \".$httpcode;\r\n                                } else {\r\n                                   echo \"OK \".$httpcode;\r\n                                }\r\n                                \r\n                                echo $resp;\r\n                                \r\n                                // Close request to clear up some resources\r\n                                curl_close($curl);\r\nWhat is lacking with my code?"},"comment":{"url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/comments/271473204","html_url":"https://github.com/hotelbeds-sdk/hotel-api-sdk-php/issues/69#issuecomment-271473204","issue_url":"https://api.github.com/repos/hotelbeds-sdk/hotel-api-sdk-php/issues/69","id":271473204,"user":{"login":"bunwanli","id":12594149,"avatar_url":"https://avatars.githubusercontent.com/u/12594149?v=3","gravatar_id":"","url":"https://api.github.com/users/bunwanli","html_url":"https://github.com/bunwanli","followers_url":"https://api.github.com/users/bunwanli/followers","following_url":"https://api.github.com/users/bunwanli/following{/other_user}","gists_url":"https://api.github.com/users/bunwanli/gists{/gist_id}","starred_url":"https://api.github.com/users/bunwanli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunwanli/subscriptions","organizations_url":"https://api.github.com/users/bunwanli/orgs","repos_url":"https://api.github.com/users/bunwanli/repos","events_url":"https://api.github.com/users/bunwanli/events{/privacy}","received_events_url":"https://api.github.com/users/bunwanli/received_events","type":"User","site_admin":false},"created_at":"2017-01-10T02:57:26Z","updated_at":"2017-01-10T02:57:26Z","body":"thanks, problem solved."}}
{"actor":{"display_login":"bunwanli"}}