Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Erro Ao criar Account #294

Open
tperrelli opened this issue Nov 7, 2018 · 0 comments
Open

Erro Ao criar Account #294

tperrelli opened this issue Nov 7, 2018 · 0 comments

Comments

@tperrelli
Copy link

Olá, ao tentar criar um account, obtenho o erro da imagem a seguir

captura de tela 2018-11-07 as 19 41 19

Código

Em ServiceProvider
$key = $this->app->make('config')->get('moip.credentials.key'); $token = '09d0e7a8e09d4106aa4327c93312827d_v2'; return new Moip(new OAuth($token), Moip::ENDPOINT_SANDBOX);

Tentativa de criação de conta
$moipSeller = $this->moip->accounts() ->setName($request->input('person.first_name')) ->setEmail($request->input('person.email')) ->setTaxDocument($request->input('person.cpf')) ->setBirthDate($request->input('person.birth')) ->setPhone($request->input('person.area'), $request->input('person.phone'), "55") ->addAddress( $request->input('person.address'), $request->input('person.number'), $request->input('person.neighborhood'), $request->input('person.city'), $request->input('person.state'), $request->input('person.postal'), $request->input('person.complement') ) ->setCompanyName($request->input('company.fantasy'), $request->input('company.registration')) ->setCompanyTaxDocument($request->input('company.cnpj')) ->setCompanyPhone($request->input('company.area'), $request->input('company.phone'), "55") ->setCompanyAddress( $request->input('company.address'), $request->input('company.number'), $request->input('company.neighborhood'), $request->input('company.city'), $request->input('company.state'), $request->input('company.postal'), $request->input('company.complement') ) ->create();

Payload
company: { name: "Escola Carrossel", businessName: "Escola Carrossel LTDA", taxDocument: { type: "CNPJ", number: "18.167.997/0001-34" }, phone: { countryCode: "55", areaCode: "11", number: "965213244" }, address: { street: "Av. Brigadeiro Faria Lima", streetNumber: "2927", district: "Itaim", zipCode: "01234-000", city: "São Paulo", state: "SP", country: "BRA" } }

Se eu jogar exatamente o mesmo payload num node, funciona normalmente, porém obtenho o erro da imagem quando utilizo a lib PHP.

Alguém faz idéia sobre como resolver?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant