{"action":"created","issue":{"url":"https://api.github.com/repos/moip/moip-sdk-php/issues/283","repository_url":"https://api.github.com/repos/moip/moip-sdk-php","labels_url":"https://api.github.com/repos/moip/moip-sdk-php/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/moip/moip-sdk-php/issues/283/comments","events_url":"https://api.github.com/repos/moip/moip-sdk-php/issues/283/events","html_url":"https://github.com/moip/moip-sdk-php/issues/283","id":333071085,"node_id":"MDU6SXNzdWUzMzMwNzEwODU=","number":283,"title":"Erro na criação de conta - Exatamente como está no exemplo da documentação","user":{"login":"zappts","id":38696666,"node_id":"MDQ6VXNlcjM4Njk2NjY2","avatar_url":"https://avatars1.githubusercontent.com/u/38696666?v=4","gravatar_id":"","url":"https://api.github.com/users/zappts","html_url":"https://github.com/zappts","followers_url":"https://api.github.com/users/zappts/followers","following_url":"https://api.github.com/users/zappts/following{/other_user}","gists_url":"https://api.github.com/users/zappts/gists{/gist_id}","starred_url":"https://api.github.com/users/zappts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zappts/subscriptions","organizations_url":"https://api.github.com/users/zappts/orgs","repos_url":"https://api.github.com/users/zappts/repos","events_url":"https://api.github.com/users/zappts/events{/privacy}","received_events_url":"https://api.github.com/users/zappts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-17T15:30:06Z","updated_at":"2018-06-18T13:50:34Z","closed_at":null,"author_association":"NONE","body":"Olá,\r\n\r\nexecutei exatamente o código que está no exemplo da documentação (https://dev.moip.com.br/reference#criar-conta-moip-transparente-2) porém está retornando um erro que paralisa a execução e não informa exatamente o erro que se está cometendo.\r\n\r\nMensagem exibida no browser:\r\n[0] The following errors ocurred:\r\n\r\nNote, pelo meu código, que o comando die(3) não chega a ser executado.\r\n\r\nCódigo: \r\ntry {\r\n$account = $moip->accounts()\r\n\t->setName('Fulano')\r\n  ->setLastName('De Tal')\r\n  ->setEmail('fulano@email2.com')\r\n  ->setIdentityDocument('4737283560', 'SSP', '2015-06-23')\r\n  ->setBirthDate('1988-12-30')\r\n  ->setTaxDocument('16262131000')\r\n  ->setType('MERCHANT')\r\n  ->setTransparentAccount(true)\r\n  ->setPhone(11, 66778899, 55)\r\n  ->addAlternativePhone(11, 66448899, 55)\r\n  ->addAddress('Rua de teste', 123, 'Bairro', 'Sao Paulo', 'SP', '01234567', 'Apt. 23', 'BRA')\r\n  ->setCompanyName('Empresa Teste', 'Teste Empresa ME')\r\n  ->setCompanyOpeningDate('2011-01-01')\r\n  ->setCompanyPhone(11, 66558899, 55)\r\n  ->setCompanyTaxDocument('69086878000198')\r\n  ->setCompanyAddress('Rua de teste 2', 123, 'Bairro Teste', 'Sao Paulo', 'SP', '01234567', 'Apt. 23', 'BRA')\r\n  ->setCompanyMainActivity('82.91-1/00', 'Atividades de cobranças e informações cadastrais')\r\n  ->create();\r\n\r\ndie('3');\r\n\r\n} catch (\\Moip\\Exceptions\\UnautorizedException $e) {\r\n    echo $e->getMessage();\r\n} catch (\\Moip\\Exceptions\\ValidationException $e) {\r\n    printf($e->__toString());\r\n} catch (\\Moip\\Exceptions\\UnexpectedException $e) {\r\n    echo $e->getMessage();\r\n}\r\n\r\n\r\n<img width=\"709\" alt=\"captura de tela 2018-06-17 as 12 30 30\" src=\"https://user-images.githubusercontent.com/38696666/41509460-41054de0-722a-11e8-9dc2-addba53268fb.png\">\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/moip/moip-sdk-php/issues/comments/398060708","html_url":"https://github.com/moip/moip-sdk-php/issues/283#issuecomment-398060708","issue_url":"https://api.github.com/repos/moip/moip-sdk-php/issues/283","id":398060708,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODA2MDcwOA==","user":{"login":"zappts","id":38696666,"node_id":"MDQ6VXNlcjM4Njk2NjY2","avatar_url":"https://avatars1.githubusercontent.com/u/38696666?v=4","gravatar_id":"","url":"https://api.github.com/users/zappts","html_url":"https://github.com/zappts","followers_url":"https://api.github.com/users/zappts/followers","following_url":"https://api.github.com/users/zappts/following{/other_user}","gists_url":"https://api.github.com/users/zappts/gists{/gist_id}","starred_url":"https://api.github.com/users/zappts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zappts/subscriptions","organizations_url":"https://api.github.com/users/zappts/orgs","repos_url":"https://api.github.com/users/zappts/repos","events_url":"https://api.github.com/users/zappts/events{/privacy}","received_events_url":"https://api.github.com/users/zappts/received_events","type":"User","site_admin":false},"created_at":"2018-06-18T13:50:34Z","updated_at":"2018-06-18T13:50:34Z","author_association":"NONE","body":"Consegui resolver, era um erro meu mesmo, estava me conectando via TOKEN+CHAVE e não via ACCESSTOKEN.\r\n\r\nEu estava realizando operações usando TOKEN+CHAVE e aproveitei o mesmo código para efetuar essa operação que exige uma autenticação diferente.\r\n\r\nDe qualquer forma, acredito que o código deveria dar o resultado de 403 Forbidden.\r\n\r\nObrigado. Mantive a thread para que possa ajudar a alguém que venha a enfrentar o mesmo problema que eu enfrentei.\r\n\r\nAtt,"}}
{"actor":{"display_login":"zappts"}}