Open tperrelli opened 5 years ago
Olá, ao tentar criar um account, obtenho o erro da imagem a seguir
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);
$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();
$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" } }
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?
Olá, ao tentar criar um account, obtenho o erro da imagem a seguir
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?