Add tests for Coolify app payload handling, e-conomic customer fields, and expand Coolify API client capabilities

This commit is contained in:
Jeppe Bundgaard
2026-05-19 16:55:45 +02:00
parent cbf3c2d2b9
commit c2263b8c98
11 changed files with 684 additions and 41 deletions
+5 -2
View File
@@ -451,14 +451,17 @@ class authRoute
$response->error('Company phone number already registered', 400);
}
// Get the customer name
$name = (new virkdata())->getCompanyInformation($cvr, '', [])->name;
// Get the CVR company information used for the e-conomic customer payload.
$companyInformation = (new virkdata())->getCompanyInformation($cvr, '', []);
$name = (string)($companyInformation->name ?? '');
$result = $economic->createCustomer(
(int)$companyPhone,
$name,
(int)$cvr,
(string)$invoiceEmail,
(int)$companyPhone,
(int)$contactPhone,
$companyInformation,
);
if (!isset($result->customerNumber) || !is_numeric($result->customerNumber)) {