From 7e59d22872f9c6a96b1b6e42fcfc7fe25be26703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Gla=CC=88ser?= Date: Wed, 12 Aug 2026 16:25:45 +0200 Subject: [PATCH] Dokumentiere Shopify-Webhook-Tests und Endpunkt --- .../erp.import-integration.shopify_order_sync.md | 4 ++++ .../shopify-umstellung-checkliste.md | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/modules/erp/import-integration/processes/main/erp.import-integration.shopify_order_sync.md b/docs/modules/erp/import-integration/processes/main/erp.import-integration.shopify_order_sync.md index 54c2292..d89de27 100644 --- a/docs/modules/erp/import-integration/processes/main/erp.import-integration.shopify_order_sync.md +++ b/docs/modules/erp/import-integration/processes/main/erp.import-integration.shopify_order_sync.md @@ -39,6 +39,10 @@ Read sources: - Shopify-API nur read-only, sofern für die Ereignisidentität erforderlich - eigene technische Importzustandsdaten +Public endpoint: + +- `POST https://erpnaurua.imhochrain.ch/api/shopify/webhooks.php` + Write targets: - technische Importzustandsdaten im owning Submodul diff --git a/docs/modules/erp/import-integration/shopify-umstellung-checkliste.md b/docs/modules/erp/import-integration/shopify-umstellung-checkliste.md index 2980a6c..7b427fd 100644 --- a/docs/modules/erp/import-integration/shopify-umstellung-checkliste.md +++ b/docs/modules/erp/import-integration/shopify-umstellung-checkliste.md @@ -146,12 +146,17 @@ Fachliche Übergabe: `erp/bestellungen` - [ ] Separate read-only Shopify-Integration für den laufenden ERP-Sync konfigurieren. - [x] Separate Shopify-App `Naurua ERP Order Sync` im Dev Dashboard angelegt. - [x] Read-only-Bereiche im App-Entwurf hinterlegt: `read_orders`, `read_all_orders`, `read_customers`, `read_products`. -- [x] App-Version bewusst noch nicht veröffentlicht, da App-/Callback-URL noch nicht implementiert ist. +- [ ] App-Version veröffentlichen, sobald Callback- und Webhook-Registrierung vollständig sind. - [x] App-URL festgelegt und im Entwurf hinterlegt: `https://erpnaurua.imhochrain.ch/`. -- [x] OAuth-Callback-URL festgelegt und im Entwurf hinterlegt: `https://erpnaurua.imhochrain.ch/api/shopify/oauth/callback`. -- [ ] Webhook-URL implementieren und registrieren: `https://erpnaurua.imhochrain.ch/api/shopify/webhooks`. +- [x] OAuth-Callback-URL im Entwurf auf `.php` korrigiert: `https://erpnaurua.imhochrain.ch/api/shopify/oauth/callback.php`. +- [x] Webhook-URL implementiert: `https://erpnaurua.imhochrain.ch/api/shopify/webhooks.php`. +- [ ] Webhook-URL in Shopify registrieren. - [x] Belegt: Root-Domain ist erreichbar. -- [x] Belegt: OAuth-Callback- und Webhook-Pfade liefern aktuell `404`, da sie noch nicht implementiert sind. +- [x] Belegt: `POST /api/shopify/webhooks.php` liefert bei ungültiger HMAC `401`. +- [x] Gültige HMAC auf DEV mit temporärem Test-Secret akzeptiert (`200 accepted`). +- [x] Doppelte Webhook-ID auf DEV idempotent als `200 duplicate` bestätigt. +- [x] Test-Events und Test-Prozessläufe nach dem Test vollständig gelöscht. +- [x] Test-Secret nach dem Test aus DEV entfernt. - [ ] Verbindliche Shopify-API-Version festlegen. - [ ] Zugangsdaten sicher in DEV-Konfiguration hinterlegen. - [ ] GraphQL-Abfragen für Initialbestand definieren.