feat(113): fakturownia integration foundation
Phase 113 complete (v3.7 Invoices): - DB: invoices, invoice_configs, invoice_number_counters, fakturownia_integration_settings + orders.invoice_requested - FakturowniaIntegrationRepository (multi-account via integrations.type='fakturownia') - FakturowniaApiClient (testConnection; createInvoice/downloadPdf STUBs) - IntegrationsRepository::updateTestResult() (reusable test-result writer) - /settings/integrations/fakturownia (list + edit + test + delete) - Karta Fakturownia w hubie /settings/integrations Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,29 @@ final class IntegrationsRepository
|
||||
]);
|
||||
}
|
||||
|
||||
public function updateTestResult(int $integrationId, string $status, ?int $httpCode, string $message): void
|
||||
{
|
||||
if ($integrationId <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$statement = $this->pdo->prepare(
|
||||
'UPDATE integrations
|
||||
SET last_test_status = :status,
|
||||
last_test_http_code = :http_code,
|
||||
last_test_message = :message,
|
||||
last_test_at = NOW(),
|
||||
updated_at = NOW()
|
||||
WHERE id = :id'
|
||||
);
|
||||
$statement->execute([
|
||||
'id' => $integrationId,
|
||||
'status' => substr($status, 0, 16),
|
||||
'http_code' => $httpCode,
|
||||
'message' => substr($message, 0, 255),
|
||||
]);
|
||||
}
|
||||
|
||||
public function getApiKeyEncrypted(int $integrationId): ?string
|
||||
{
|
||||
if ($integrationId <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user