-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingdeliveryDelivery service relatedDelivery service relatedfoodpandaFoodpanda integrationFoodpanda integrationintegrationThird-party integration issuesThird-party integration issuespriority:highHigh priorityHigh priority
Description
問題描述
Foodpanda 外送平台的訂單無法正確同步到系統中,導致店家無法及時處理 Foodpanda 的訂單。
當前狀態
系統已實現 Foodpanda 整合的基礎架構:
- ✅ Foodpanda OAuth 認證
- ✅ 菜單上傳功能
- ✅ Webhook 接收端點
- ❌ 訂單同步功能(有問題)
相關程式碼位置
Webhook 處理
server/routes/delivery.js:80-88- Foodpanda webhook 路由定義server/controllers/Delivery/delivery.js-handleFoodpandaWebhook控制器
訂單同步服務
server/services/delivery/core/orderSyncService.js- 訂單同步核心邏輯server/services/delivery/platforms/foodpanda/- Foodpanda 平台特定實作
菜單管理
server/services/delivery/platforms/foodpanda/foodpandaMenu.js- 菜單上傳server/services/delivery/platforms/foodpanda/foodpandaAuth.js- 認證管理
問題細節
需要調查以下問題:
-
Webhook 接收問題
- Webhook 是否正確接收 Foodpanda 的訂單通知?
- 是否有正確的簽名驗證機制?
-
訂單解析問題
- Foodpanda 訂單格式是否正確解析?
- 商品映射(Foodpanda ID → 系統 DishTemplate ID)是否正確?
-
訂單創建問題
- 解析後的訂單是否成功創建到系統中?
- 是否有庫存、價格驗證問題?
-
錯誤處理
- 是否有適當的錯誤日誌?
- 失敗的訂單是否有重試機制?
調查步驟
- 檢查 Foodpanda webhook 日誌
- 驗證 webhook 簽名驗證邏輯
- 測試訂單解析流程
- 檢查商品 ID 映射邏輯
- 驗證訂單創建流程
參考資料
- Foodpanda API 文檔: https://developers.deliveryhero.com/ (需確認最新端點)
- 相關測試腳本:
scripts/foodpanda/
優先級
High - 影響營運,店家無法接收 Foodpanda 訂單
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdeliveryDelivery service relatedDelivery service relatedfoodpandaFoodpanda integrationFoodpanda integrationintegrationThird-party integration issuesThird-party integration issuespriority:highHigh priorityHigh priority