|
@@ -32,6 +32,7 @@ class CompanyWithUserController
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
val::key('company_name', val::stringType()->notEmpty()->length(1, 255))
|
|
val::key('company_name', val::stringType()->notEmpty()->length(1, 255))
|
|
|
|
|
+ ->key('company_user', val::stringType()->notEmpty()->length(1, 255))
|
|
|
->key('username', val::stringType()->notEmpty()->length(1, 100))
|
|
->key('username', val::stringType()->notEmpty()->length(1, 100))
|
|
|
->key('email', val::email())
|
|
->key('email', val::email())
|
|
|
->key('password', val::stringType()->length(8, null))
|
|
->key('password', val::stringType()->length(8, null))
|
|
@@ -130,15 +131,16 @@ class CompanyWithUserController
|
|
|
$pdo->commit();
|
|
$pdo->commit();
|
|
|
|
|
|
|
|
$analysisPayload = [
|
|
$analysisPayload = [
|
|
|
- 'corporate_name' => $body['company_name'],
|
|
|
|
|
|
|
+ 'corporate_name' => $body['company_user'],
|
|
|
'cnpj' => $body['cnpj'],
|
|
'cnpj' => $body['cnpj'],
|
|
|
- 'partners' => [[
|
|
|
|
|
- 'cpf' => $body['cpf'],
|
|
|
|
|
- 'email' => $body['email'],
|
|
|
|
|
- 'phone' => $body['phone'],
|
|
|
|
|
- ]],
|
|
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+ error_log(sprintf(
|
|
|
|
|
+ '[CompanyWithUserController] Sending company_user="%s" with analysis payload: %s',
|
|
|
|
|
+ $body['company_user'],
|
|
|
|
|
+ json_encode($analysisPayload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
|
|
|
|
|
+ ));
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
$tshield = $this->tshieldService->generateCompanyLink(
|
|
$tshield = $this->tshieldService->generateCompanyLink(
|
|
|
(int)$userData['user_id'],
|
|
(int)$userData['user_id'],
|