{"action":"created","issue":{"url":"https://api.github.com/repos/taxamo/taxamo-php/issues/9","labels_url":"https://api.github.com/repos/taxamo/taxamo-php/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/taxamo/taxamo-php/issues/9/comments","events_url":"https://api.github.com/repos/taxamo/taxamo-php/issues/9/events","html_url":"https://github.com/taxamo/taxamo-php/issues/9","id":64637234,"number":9,"title":"Vat Validation timeout","user":{"login":"prwhitehead","id":1199977,"avatar_url":"https://avatars.githubusercontent.com/u/1199977?v=3","gravatar_id":"","url":"https://api.github.com/users/prwhitehead","html_url":"https://github.com/prwhitehead","followers_url":"https://api.github.com/users/prwhitehead/followers","following_url":"https://api.github.com/users/prwhitehead/following{/other_user}","gists_url":"https://api.github.com/users/prwhitehead/gists{/gist_id}","starred_url":"https://api.github.com/users/prwhitehead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prwhitehead/subscriptions","organizations_url":"https://api.github.com/users/prwhitehead/orgs","repos_url":"https://api.github.com/users/prwhitehead/repos","events_url":"https://api.github.com/users/prwhitehead/events{/privacy}","received_events_url":"https://api.github.com/users/prwhitehead/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-26T21:23:46Z","updated_at":"2015-03-27T12:28:39Z","closed_at":"2015-03-27T11:02:49Z","body":"Hello. I have been using the PHP Library. I think there is an issue in the `Taxamo::validateTaxNumber()` method. It seems that they require a header key to be set `Private-Token`. \r\n\r\nI have a working example using Guzzle: \r\n```\r\n        #Validate a vat number\r\n        $client = new Guzzle([\r\n            'base_url' => [\r\n                'https://api.taxamo.com/api/{version}/tax/vat_numbers/{vat_number}/validate', [\r\n                    'version' => 'v1',\r\n                    'vat_number' => $vatNumber,\r\n                ]\r\n            ],\r\n            'defaults' => [\r\n                'headers' => ['Private-Token' => $taxamoPrivateKey],\r\n                'query'   => ['country_code' => $countryCode],\r\n            ]\r\n        ]);\r\n\r\n        $response = $client->get();\r\n        $body = json_decode($response->getBody()->getContents());\r\n```\r\n\r\nHowever using the Taxamo library: \r\n```\r\n        $taxamoApiUrl = 'https://api.taxamo.com';\r\n        $taxamo = new Taxamo(new APIClient($taxamoPublicKey, $taxamoApiUrl));\r\n        dump($taxamo->validateTaxNumber($countryCode, $vatNumber)); die;\r\n```\r\nI get the following:\r\nTIMEOUT: api call to https://api.taxamo.com/api/v1/tax/vat_numbers/12345678/validate?country_code=GB took more than 5s to return. \r\n\r\nI am using dev-master `\"taxamo/taxamo-php\": \"1.*\",` and including the Taxamo.php file manually in my app_dev.php (because of the reasons stated in the other open issue). \r\n\r\nThanks in advance. :)"},"comment":{"url":"https://api.github.com/repos/taxamo/taxamo-php/issues/comments/86926727","html_url":"https://github.com/taxamo/taxamo-php/issues/9#issuecomment-86926727","issue_url":"https://api.github.com/repos/taxamo/taxamo-php/issues/9","id":86926727,"user":{"login":"tlipski","id":876542,"avatar_url":"https://avatars.githubusercontent.com/u/876542?v=3","gravatar_id":"","url":"https://api.github.com/users/tlipski","html_url":"https://github.com/tlipski","followers_url":"https://api.github.com/users/tlipski/followers","following_url":"https://api.github.com/users/tlipski/following{/other_user}","gists_url":"https://api.github.com/users/tlipski/gists{/gist_id}","starred_url":"https://api.github.com/users/tlipski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlipski/subscriptions","organizations_url":"https://api.github.com/users/tlipski/orgs","repos_url":"https://api.github.com/users/tlipski/repos","events_url":"https://api.github.com/users/tlipski/events{/privacy}","received_events_url":"https://api.github.com/users/tlipski/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T12:28:39Z","updated_at":"2015-03-27T12:28:39Z","body":"The token is set in https://github.com/taxamo/taxamo-php/blob/master/lib/Taxamo/Swagger.php#L75 - are you sure you are providing it correctly when instantating APIClient ? Can you try with SamplePrivateTestKey1?"}}