feat(v1.7): orderPRO -> shopPRO status push sync

Implement bidirectional status sync for shopPRO integrations.
When direction is set to orderpro_to_shoppro, cron pushes manual
status changes to shopPRO via PUT API with reverse status mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 12:54:57 +01:00
parent 054816b0ba
commit 957fddaf84
13 changed files with 867 additions and 41 deletions

View File

@@ -84,18 +84,26 @@ final class CronHandlerFactory
$shopproIntegrationsRepo = new ShopproIntegrationsRepository($this->db, $this->integrationSecret);
$shopproApiClient = new ShopproApiClient();
$shopproSyncStateRepo = new ShopproOrderSyncStateRepository($this->db);
$shopproStatusMappingRepo = new ShopproStatusMappingRepository($this->db);
$shopproSyncService = new ShopproOrdersSyncService(
$shopproIntegrationsRepo,
new ShopproOrderSyncStateRepository($this->db),
$shopproSyncStateRepo,
$shopproApiClient,
new OrderImportRepository($this->db),
new ShopproStatusMappingRepository($this->db),
$shopproStatusMappingRepo,
$ordersRepository,
new ShopproOrderMapper(),
new ShopproProductImageResolver($shopproApiClient)
);
$shopproStatusSyncService = new ShopproStatusSyncService($shopproIntegrationsRepo, $shopproSyncService);
$shopproStatusSyncService = new ShopproStatusSyncService(
$shopproIntegrationsRepo,
$shopproSyncService,
$shopproApiClient,
$shopproSyncStateRepo,
$shopproStatusMappingRepo,
$this->db
);
$shopproPaymentSyncService = new ShopproPaymentStatusSyncService(
$shopproIntegrationsRepo,
new ShopproApiClient(),