taiwan-logistics-skill 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,20 @@
1
- <h1 align="center">Taiwan Logistics Skill</h1>
1
+ <h1 align="center">taiwan-logistics-skill</h1>
2
2
 
3
3
  <h3 align="center">台灣物流 AI 開發技能包</h3>
4
4
 
5
5
  <p align="center">
6
- <strong>支援 ECPay 綠界 · NewebPay 藍新 · PAYUNi 統一</strong>
6
+ <strong>6 家物流 aggregator + HCT 新竹物流直連 carrier API</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ ECPay · NewebPay · PAYUNi · SmilePay · PChomePay · PayNow · HCT 直連
7
11
  </p>
8
12
 
9
13
  <p align="center">
10
14
  <a href="https://www.npmjs.com/package/taiwan-logistics-skill"><img src="https://img.shields.io/npm/v/taiwan-logistics-skill?style=flat-square&logo=npm" alt="npm version"></a>
11
15
  <a href="https://www.npmjs.com/package/taiwan-logistics-skill"><img src="https://img.shields.io/npm/dm/taiwan-logistics-skill?style=flat-square&label=downloads" alt="npm downloads"></a>
12
- <img src="https://img.shields.io/badge/node-%3E%3D18-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node.js">
13
- <img src="https://img.shields.io/badge/platforms-14-blue?style=flat-square" alt="14 Platforms">
16
+ <img src="https://img.shields.io/badge/providers-7-success?style=flat-square" alt="7 Providers">
17
+ <img src="https://img.shields.io/badge/AI%20platforms-14-blue?style=flat-square" alt="14 AI Platforms">
14
18
  <a href="https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Moksa1123/taiwan-ecommerce-toolkit?style=flat-square" alt="License"></a>
15
19
  </p>
16
20
 
@@ -20,370 +24,101 @@
20
24
 
21
25
  ---
22
26
 
23
- ## 專案簡介
24
-
25
- Taiwan Logistics Skill 是專為台灣物流整合設計的 AI 開發工具包,支援三大物流服務商 (ECPay、NewebPay、PAYUNi) 的完整 API 整合。本工具包提供企業級程式碼範例、BM25 智能搜尋引擎、服務商推薦系統與代碼生成器,協助開發團隊快速完成物流系統整合。
26
-
27
- **版本:** 1.1.3
28
- **狀態:** Production Ready
29
-
30
- ---
31
-
32
- ## 核心特色
33
-
34
- ### 企業級程式碼標準
35
-
36
- 所有 Python 範例均達到生產環境品質:
37
-
38
- - **完整型別定義** - Dataclass 搭配 Literal、Optional、Dict 型別提示
39
- - **專業文件規範** - 詳細的 Docstring (Args/Returns/Raises/Example)
40
- - **嚴謹錯誤處理** - 完整的例外處理與中文錯誤訊息
41
- - **實戰測試憑證** - 包含測試環境憑證,可直接執行驗證
42
-
43
- ### 生產級 Python 範例
44
-
45
- 完整的物流整合實作,支援多種物流方式:
46
-
47
- - **ecpay-logistics-cvs-example.py** - 綠界 C2C 物流
48
- - **newebpay-logistics-cvs-example.py** - 藍新超商物流
49
- - **payuni-logistics-cvs-example.py** - 統一超商物流
50
- - **store-map-integration-example.html** - 門市地圖整合
51
-
52
- ### BM25 智能搜尋引擎
53
-
54
- 採用 BM25 演算法的語義搜尋系統:
55
-
56
- ```bash
57
- python scripts/search.py "超商取貨" --domain operation
58
- python scripts/search.py "溫控配送" --domain logistics_type
59
- python scripts/search.py "查詢物流狀態" --domain api
60
- ```
61
-
62
- ### 智能推薦系統
63
-
64
- 基於關鍵字權重與 BM25 評分的物流服務商推薦引擎:
65
-
66
- ```bash
67
- python scripts/recommend.py "超商取貨 溫控配送 冷凍宅配"
68
- python scripts/recommend.py "穩定 電商 高交易量"
69
- ```
70
-
71
- ### 自動化程式碼生成器
72
-
73
- 支援 TypeScript 與 Python 雙語言輸出:
74
-
75
- ```bash
76
- python scripts/generate-logistics-service.py ECPay --output ts
77
- python scripts/generate-logistics-service.py NewebPay --output py
78
- ```
79
-
80
- ---
81
-
82
- ## 快速開始
83
-
84
- ### 安裝
27
+ ## 安裝
85
28
 
86
29
  ```bash
87
30
  npm install -g taiwan-logistics-skill
88
31
  ```
89
32
 
90
- ### 初始化
33
+ ## 快速開始
91
34
 
92
35
  ```bash
93
- # 進入專案目錄
94
36
  cd /path/to/your/project
95
37
 
96
- # 選擇你的 AI 助手
38
+ taiwan-logistics init # 互動式
97
39
  taiwan-logistics init --ai claude # Claude Code
98
- taiwan-logistics init --ai cursor # Cursor
99
- taiwan-logistics init --ai windsurf # Windsurf
100
- taiwan-logistics init --ai copilot # GitHub Copilot
101
- taiwan-logistics init --ai antigravity # Antigravity
102
40
  taiwan-logistics init --ai all # 全部安裝
103
41
  ```
104
42
 
105
- ### 使用方式
106
-
107
- 安裝完成後,在 AI 助手中直接使用自然語言描述需求:
43
+ 安裝完後,在 AI 助手用自然語言:
108
44
 
109
45
  ```
110
- 實作 ECPay 7-11 超商取貨功能,支援取貨付款
111
- 建立 NewebPay 全家超商物流訂單
112
- 查詢 PAYUNi 黑貓宅配物流狀態
46
+ 查詢台北市信義區的 7-11 取貨點,整合 ECPay 物流
47
+ 建立 SmilePay 黑貓宅急便冷凍 C2C 訂單,COD 1000 元
48
+ PChomePay 7-11 取貨付款,金額 1500 元,notify URL 設好
49
+ PayNow 7-11 大宗寄倉,使用 3DES 加密
50
+ HCT 直連 API 傳入託運資料,逆物流單獨處理
113
51
  ```
114
52
 
115
53
  ---
116
54
 
117
- ## CLI 指令
118
-
119
- ```bash
120
- # 列出支援平台
121
- taiwan-logistics list
122
-
123
- # 顯示技能資訊
124
- taiwan-logistics info
55
+ ## 7 家物流服務商
125
56
 
126
- # 列出可用版本
127
- taiwan-logistics versions
57
+ | 服務商 | 類型 | 加密 / 認證 | 特色 |
58
+ |---|---|---|---|
59
+ | **ECPay 綠界** | aggregator | MD5 CheckMacValue | 市佔率最高、SDK 完整、7-11/全家/萊爾富/OK/黑貓/宅配通/HCT |
60
+ | **NewebPay 藍新** | aggregator | AES-256-CBC + SHA256 | 7-11/全家/萊爾富/OK/黑貓 |
61
+ | **PAYUNi 統一** | aggregator | AES-256-GCM + SHA256 | 7-11 常溫/冷凍 + T-Cat 常溫/冷藏/冷凍(溫控配送最完整) |
62
+ | **SmilePay 速買配** | aggregator | Verify_key + 加權檢核碼 | Pay_zg 矩陣 51/52/55/56/81/82/83,含逆物流 |
63
+ | **PChomePay 拍錢包** | aggregator | HTTP Basic Auth → token | 金物流二合一、Notify IP 113.196.231.190、4 大超商 |
64
+ | **PayNow 立吉富** | aggregator | **3DES/ECB/Zero-Padding** | 11 條產品線(含海外配送);不同於金流端 AES |
65
+ | **HCT 新竹物流** | **direct carrier API** | 申請後提供金鑰 | 直連 carrier API(vs 透過 aggregator) |
128
66
 
129
- # 檢查更新
130
- taiwan-logistics update
67
+ ## 技能包內容
131
68
 
132
- # 強制覆蓋安裝
133
- taiwan-logistics init --force
134
-
135
- # 全域安裝 (所有專案共用)
136
- taiwan-logistics init --ai claude --global
137
69
  ```
138
-
139
- ---
140
-
141
- ## 支援平台
142
-
143
- | 平台 | 說明 | 啟動方式 |
144
- |------|------|----------|
145
- | **Claude Code** | Anthropic 官方 CLI | `/taiwan-logistics` |
146
- | **Cursor** | AI 程式編輯器 | `/taiwan-logistics` |
147
- | **Windsurf** | Codeium 編輯器 | 自動載入 |
148
- | **Copilot** | GitHub Copilot | `/taiwan-logistics` |
149
- | **Antigravity** | Google AI 助手 | `/taiwan-logistics` |
150
- | **Kiro** | AWS AI 助手 | `/taiwan-logistics` |
151
- | **Codex** | OpenAI CLI | 自動載入 |
152
- | **Qoder** | Qodo AI 助手 | 自動載入 |
153
- | **RooCode** | VSCode 擴充 | `/taiwan-logistics` |
154
- | **Gemini CLI** | Google Gemini | 自動載入 |
155
- | **Trae** | ByteDance AI | 自動載入 |
156
- | **OpenCode** | 開源 AI 助手 | 自動載入 |
157
- | **Continue** | 開源 AI 助手 | 自動載入 |
158
- | **CodeBuddy** | Tencent AI | 自動載入 |
159
-
160
- ---
161
-
162
- ## 物流服務商支援
163
-
164
- | 物流服務 | 加密技術 | API 風格 | 支援物流類型 |
165
- |----------|----------|----------|--------------|
166
- | **ECPay 綠界** | MD5 CheckMacValue | Form POST | 7-11、全家、萊爾富、OK、黑貓、新竹貨運 |
167
- | **NewebPay 藍新** | AES-256-CBC + SHA256 | Form POST + AES | 7-11、全家、萊爾富、OK、黑貓宅急便 |
168
- | **PAYUNi 統一** | AES-256-GCM + SHA256 | RESTful JSON | 7-11 (常溫/冷凍)、黑貓 (常溫/冷凍/冷藏) |
169
-
170
- ---
171
-
172
- ## 物流方式支援
173
-
174
- ### 超商取貨
175
-
176
- - 7-11 取貨 (常溫/冷凍)
177
- - 全家取貨
178
- - OK超商取貨
179
- - 萊爾富取貨
180
- - 超商取貨付款
181
-
182
- ### 宅配服務
183
-
184
- - 黑貓宅急便
185
- - 新竹貨運
186
- - 冷凍宅配
187
- - 冷藏宅配
188
-
189
- ### 其他服務
190
-
191
- - C2C 店到店
192
- - B2C 大宗寄倉
193
- - 溫控物流
194
-
195
- ---
196
-
197
- ## 智能工具
198
-
199
- 所有工具皆採用純 Python 實作,無需安裝外部依賴套件。
200
-
201
- ### BM25 搜尋引擎
202
-
203
- ```bash
204
- # 物流類型查詢
205
- python scripts/search.py "超商取貨" --domain logistics_type
206
-
207
- # API 端點搜尋
208
- python scripts/search.py "查詢物流狀態" --domain operation
209
-
210
- # 服務商比較
211
- python scripts/search.py "溫控配送" --domain provider
212
- ```
213
-
214
- 支援搜尋域:
215
- - `provider` - 物流服務商比較
216
- - `operation` - API 操作端點
217
- - `logistics_type` - 物流類型
218
- - `troubleshoot` - 疑難排解
219
-
220
- ### 物流服務商推薦系統
221
-
222
- ```bash
223
- # 根據需求推薦物流服務商
224
- python scripts/recommend.py "超商取貨 溫控配送 冷凍宅配"
225
- python scripts/recommend.py "穩定 電商 高交易量"
226
- python scripts/recommend.py "API 設計 現代化"
227
- ```
228
-
229
- ### 程式碼生成器
230
-
231
- ```bash
232
- # 生成 TypeScript 服務模組
233
- python scripts/generate-logistics-service.py ECPay --output ts > ecpay-service.ts
234
-
235
- # 生成 Python 服務模組
236
- python scripts/generate-logistics-service.py NewebPay --output py > newebpay-service.py
237
- ```
238
-
239
- ---
240
-
241
- ## 程式碼範例
242
-
243
- ### ECPay 物流整合
244
-
245
- ```python
246
- from ecpay_logistics import ECPayLogistics
247
-
248
- service = ECPayLogistics(
249
- merchant_id='2000132',
250
- hash_key='5294y06JbISpM5x9',
251
- hash_iv='v77hoKGq4kWxNNIS',
252
- test_mode=True
253
- )
254
-
255
- # 建立超商取貨訂單
256
- params = service.create_cvs_order(
257
- order_id='ORDER001',
258
- goods_name='測試商品',
259
- goods_amount=100,
260
- receiver_name='王小明',
261
- receiver_phone='0912345678',
262
- receiver_store_id='991182', # 7-11 門市代號
263
- logistics_sub_type='UNIMARTC2C' # 7-11 店到店
264
- )
70
+ taiwan-logistics/
71
+ ├── SKILL.md # AI 技能主文檔
72
+ ├── EXAMPLES.md # 實戰範例集
73
+ ├── references/ # 7 份 API 規格 (~10,300 行)
74
+ │ ├── ecpay-logistics-api.md
75
+ │ ├── NEWEBPAY_LOGISTICS_REFERENCE.md
76
+ │ ├── payuni-logistics-api.md
77
+ │ ├── smilepay-logistics-api.md # 1,332 行 / Pay_zg 矩陣
78
+ │ ├── pchomepay-logistics-api.md # 1,154 行 / NDJSON 對帳 parser
79
+ │ ├── paynow-logistics-api.md # 1,670 行 / 11 產品線
80
+ │ └── hct-logistics-api.md # 1,102 行 / 直連 HCT
81
+ ├── examples/ # Python 範例
82
+ └── data/ # 5 份 CSV
83
+ ├── providers.csv # 7 服務商
84
+ ├── operations.csv # 30+ API 操作
85
+ ├── logistics-types.csv # CVS / Home / 溫控
86
+ ├── status-codes.csv # 跨服務商狀態碼
87
+ └── field-mappings.csv # 欄位對照
265
88
  ```
266
89
 
267
- 完整範例: [ecpay-logistics-cvs-example.py](examples/ecpay-logistics-cvs-example.py)
268
-
269
- ### 門市地圖整合
270
-
271
- 提供完整的前端整合範例,支援三家服務商門市地圖選擇功能:
272
-
273
- - 響應式設計 (RWD)
274
- - 三家服務商即時切換
275
- - 門市資訊即時顯示
276
- - 後端程式碼範例內嵌
277
-
278
- 完整範例: [store-map-integration-example.html](examples/store-map-integration-example.html)
279
-
280
- ---
281
-
282
- ## 技術規格
283
-
284
- ### 系統需求
285
-
286
- - **Node.js**: >= 18.0.0 (CLI 工具)
287
- - **Python**: >= 3.8 (範例程式與智能工具)
288
-
289
- ### Python 依賴
90
+ ## CLI 指令
290
91
 
291
92
  ```bash
292
- # 範例程式所需依賴
293
- pip install pycryptodome requests
294
-
295
- # 智能工具無需外部依賴 (純 Python 標準庫)
296
- ```
297
-
298
- ### 支援的加密方式
299
-
300
- - **MD5 CheckMacValue** - ECPay 物流
301
- - **AES-256-CBC + SHA256** - NewebPay 物流
302
- - **AES-256-GCM + SHA256** - PAYUNi 物流
303
-
304
- ---
305
-
306
- ## 專案結構
307
-
308
- ```
309
- taiwan-logistics/
310
- ├── README.md # 本文件
311
- ├── SKILL.md # AI 技能文檔
312
- ├── EXAMPLES.md # 程式碼範例集
313
- │
314
- ├── references/ # API 文件
315
- │ ├── ecpay-api.md # ECPay API 規格
316
- │ ├── newebpay-api.md # NewebPay API 規格
317
- │ └── payuni-api.md # PAYUNi API 規格
318
- │
319
- ├── examples/ # 生產級 Python 範例
320
- │ ├── ecpay-logistics-cvs-example.py
321
- │ ├── newebpay-logistics-cvs-example.py
322
- │ ├── payuni-logistics-cvs-example.py
323
- │ └── store-map-integration-example.html
324
- │
325
- ├── scripts/ # Python 智能工具
326
- │ ├── search.py # BM25 搜尋引擎
327
- │ ├── recommend.py # 物流服務商推薦系統
328
- │ └── generate-logistics-service.py # 代碼生成器
329
- │
330
- └── data/ # CSV 數據檔
331
- ├── providers.csv # 物流服務商比較
332
- ├── operations.csv # API 端點定義
333
- ├── logistics-types.csv # 物流類型支援
334
- └── troubleshoot.csv # 疑難排解案例
93
+ taiwan-logistics list # 列出 AI 平台
94
+ taiwan-logistics info # 技能資訊
95
+ taiwan-logistics update # 檢查更新
96
+ taiwan-logistics init --force # 覆蓋安裝
97
+ taiwan-logistics init --global # 全域安裝
335
98
  ```
336
99
 
337
- ---
338
-
339
- ## 常見問題
340
-
341
- <details>
342
- <summary><b>是否需要申請物流服務商憑證?</b></summary>
100
+ ## 14 個 AI 平台支援
343
101
 
344
- 是的。需向選定的物流服務商申請商店代號 (Merchant ID) 與 API 金鑰 (Hash Key/IV)。七家物流服務商皆提供測試環境與測試帳號供開發使用。
102
+ Claude Code · Cursor · Windsurf · Antigravity · GitHub Copilot · Kiro · Codex · Qoder · Roo Code · Gemini · Trae · OpenCode · Continue · CodeBuddy
345
103
 
346
- </details>
104
+ ## 物流類型支援矩陣
347
105
 
348
- <details>
349
- <summary><b>Python 範例程式是否可直接用於生產環境?</b></summary>
106
+ | 取貨方式 | 7-11 | 全家 | 萊爾富 | OK | 黑貓 | 海外 | HCT |
107
+ |---|---|---|---|---|---|---|---|
108
+ | ECPay | ✅ | ✅ | ✅ | ✅ | ✅(常溫) | — | ✅ |
109
+ | NewebPay | ✅ | ✅ | ✅ | ✅ | ✅ | — | — |
110
+ | PAYUNi | ✅ | — | — | — | ✅(常溫/冷凍/冷藏) | — | — |
111
+ | SmilePay | ✅ C2C+B2C | ✅ C2C+B2C | — | — | ✅(COD/PICKUP/逆物流) | — | — |
112
+ | PChomePay | ✅ | ✅ | ✅ | ✅ | — | — | — |
113
+ | PayNow | ✅(含冷凍) | ✅(含冷凍) | ✅ | ✅ | ✅(宅配 + 店到店) | ✅(7-11) | — |
114
+ | HCT 直連 | — | — | — | — | — | — | ✅(直連) |
350
115
 
351
- 可以。所有範例程式皆為生產級品質,使用前僅需:
116
+ ## 相關套件
352
117
 
353
- 1. 安裝必要依賴套件:`pip install pycryptodome requests`
354
- 2. 將測試環境憑證替換為正式環境憑證
355
- 3. 依需求調整業務邏輯與錯誤處理機制
356
- 4. 進行完整的單元測試與整合測試
118
+ 本套件是 **[Taiwan E-Commerce Toolkit](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)** 的一部分:
357
119
 
358
- </details>
359
-
360
- <details>
361
- <summary><b>如何選擇合適的物流服務商?</b></summary>
362
-
363
- **物流服務商選擇建議:**
364
-
365
- - **ECPay 綠界**: 市佔率最高,穩定性最佳,適合需要可靠性的專案
366
- - **NewebPay 藍新**: 整合流程完整,適合需要多元物流選擇的電商平台
367
- - **PAYUNi 統一**: 支援溫控配送 (冷凍/冷藏),適合生鮮電商與需要溫控的產業
368
-
369
- 可使用本工具包提供的智能推薦系統,根據專案需求自動分析推薦。
370
-
371
- </details>
372
-
373
- <details>
374
- <summary><b>AI 助手無法載入技能檔案?</b></summary>
375
-
376
- **疑難排解步驟:**
377
-
378
- 1. 確認 SKILL.md 檔案存在於正確的目錄路徑
379
- 2. 檢查檔案開頭的 YAML frontmatter 格式是否正確
380
- 3. 重新啟動 AI 編碼助手應用程式
381
- 4. 嘗試使用 `/taiwan-logistics` 斜線命令手動觸發
382
- 5. 確認 AI 助手版本支援 Skills 功能
383
-
384
- </details>
385
-
386
- ---
120
+ - [taiwan-invoice-skill](https://www.npmjs.com/package/taiwan-invoice-skill) — 5 家電子發票
121
+ - [taiwan-payment-skill](https://www.npmjs.com/package/taiwan-payment-skill) — 10 家金流
387
122
 
388
123
  ## 授權
389
124
 
@@ -391,15 +126,6 @@ taiwan-logistics/
391
126
 
392
127
  ---
393
128
 
394
- ## 相關連結
395
-
396
- - [Taiwan Invoice Skill](../taiwan-invoice/README.md) - 電子發票整合
397
- - [Taiwan Payment Skill](../taiwan-payment/README.md) - 金流整合
398
- - [NPM Package](https://www.npmjs.com/package/taiwan-logistics-skill)
399
- - [GitHub Repository](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)
400
-
401
- ---
402
-
403
129
  <p align="center">
404
130
  <sub>Made by <strong>Moksa</strong></sub><br>
405
131
  <sub>service@moksaweb.com</sub>
@@ -1,27 +1,23 @@
1
- field_name,field_zh,ecpay_name,newebpay_name,payuni_name,type,required,max_length,format,notes
2
- merchant_id,商店代號,MerchantID,uid,MerID,string,true,10,,
3
- order_id,訂單編號,MerchantTradeNo,merchant_order_no,MerTradeNo,string,true,20,英數字,需唯一
4
- order_date,訂單日期,MerchantTradeDate,create_time,TradeTime,string,true,20,yyyy/MM/dd HH:mm:ss,
5
- logistics_type,物流類型,LogisticsType,lgs_type,LogisticsType,string,true,20,CVS/Home,
6
- logistics_sub_type,物流子類型,LogisticsSubType,lgs_sub_type,LogisticsSubType,string,true,20,,見代碼表
7
- ecpay_logistics_id,物流編號,AllPayLogisticsID,logistics_id,PayUniLogisticsID,string,false,20,,廠商回傳
8
- goods_amount,商品金額,GoodsAmount,goods_amount,GoodsAmount,integer,true,,,
9
- goods_name,商品名稱,GoodsName,goods_name,GoodsName,string,true,50,,
10
- sender_name,寄件人姓名,SenderName,sender_name,SenderName,string,true,10,,
11
- sender_phone,寄件人電話,SenderPhone,sender_tel,SenderPhone,string,true,20,,
12
- sender_cell_phone,寄件人手機,SenderCellPhone,sender_cell_phone,SenderCellPhone,string,false,20,,
13
- sender_zipcode,寄件人郵遞區號,SenderZipCode,sender_zipcode,SenderZipCode,string,false,6,,宅配必填
14
- sender_address,寄件人地址,SenderAddress,sender_address,SenderAddress,string,false,200,,宅配必填
15
- receiver_name,收件人姓名,ReceiverName,receiver_name,ReceiverName,string,true,10,,
16
- receiver_phone,收件人電話,ReceiverPhone,receiver_tel,ReceiverPhone,string,true,20,,
17
- receiver_cell_phone,收件人手機,ReceiverCellPhone,receiver_cell_phone,ReceiverCellPhone,string,false,20,,
18
- receiver_zipcode,收件人郵遞區號,ReceiverZipCode,receiver_zipcode,ReceiverZipCode,string,false,6,,宅配必填
19
- receiver_address,收件人地址,ReceiverAddress,receiver_address,ReceiverAddress,string,false,200,,宅配必填
20
- receiver_store_id,收件門市代號,ReceiverStoreID,receiver_store_code,ReceiverStoreID,string,false,6,,超商必填
21
- return_store_id,退貨門市代號,ReturnStoreID,return_store_code,ReturnStoreID,string,false,6,,
22
- is_collection,是否代收,IsCollection,is_collection,N/A,string,false,1,Y/N,超商適用
23
- collection_amount,代收金額,CollectionAmount,collection_amount,N/A,integer,false,,,
24
- temperature,溫層,Temperature,temperature,Temperature,string,false,4,0001/0002/0003,宅配適用
25
- distance,距離,Distance,distance,N/A,string,false,2,00/01,00同縣市 01外縣市
26
- specification,規格,Specification,specification,Specification,string,false,4,,包裹尺寸
27
- server_reply_url,通知網址,ServerReplyURL,notify_url,NotifyURL,string,true,200,URL,
1
+ field_name,field_zh,ecpay_name,newebpay_name,payuni_name,smilepay_name,pchomepay_name,paynow_name,hct_name,type,required,notes
2
+ merchant_id,商店代號,MerchantID,uid,MerID,Dcvc,APP_ID (Basic Auth),merID,CustomerNo,string,true,HCT 直連用 CustomerNo;PChomePay 用 Basic Auth → token
3
+ order_id,訂單編號,MerchantTradeNo,merchant_order_no,MerTradeNo,Data_id,order_id,(自選),epino,string,true,HCT 必須 esdate+epino 唯一組合
4
+ order_date,訂單日期,MerchantTradeDate,create_time,TradeTime,(系統決定),(系統決定),(系統決定),esdate (YYYY/MM/DD),string,true,HCT esdate 是「出貨日期」格式為 yyyy/MM/dd
5
+ logistics_type,物流類型,LogisticsType,lgs_type,LogisticsType,Pay_zg,pay_type,LogisticServiceID,(N/A — HCT 直連碳貓),string,true,SmilePay 用 Pay_zg 編碼;PayNow 用 ServiceID 區分 11 條產品線
6
+ logistics_sub_type,物流子類型,LogisticsSubType,lgs_sub_type,LogisticsSubType,Pay_subzg,logistic_type,(內含於 ServiceID),(N/A),string,true,SmilePay Pay_subzg=7NET/FAMI;PChomePay logistic_type=PL711/PLFMI/PLHIL/PLOK
7
+ logistics_id,物流編號,AllPayLogisticsID,logistics_id,PayUniLogisticsID,Smseid,(returned in data),LogisticTradeNo,edelno,string,false,廠商回傳;HCT 在 100 天內唯一
8
+ goods_amount,代收金額,GoodsAmount,goods_amount,GoodsAmount,Amount,(via金流),Amount,eamtcod,integer,true,COD 才填;HCT 用 eamtcod (epaytype=2)
9
+ goods_name,商品名稱,GoodsName,goods_name,GoodsName,od_sob,(無),GoodsName,eprdcl1,string,true,SmilePay 用 od_sob
10
+ sender_name,寄件人姓名,SenderName,sender_name,SenderName,(無 — 商家固定),(後台設定),SenderName,epname,string,true,
11
+ sender_phone,寄件人電話,SenderPhone,sender_tel,SenderPhone,(無),(後台設定),SenderPhone,eptel,string,true,
12
+ sender_address,寄件人地址,SenderAddress,sender_address,SenderAddress,(無),(後台設定),SenderAddress,eaddr2,string,false,宅配必填
13
+ receiver_name,收件人姓名,ReceiverName,receiver_name,ReceiverName,Pur_name,name,ReceiverName,epdcl1,string,true,
14
+ receiver_phone,收件人電話,ReceiverPhone,receiver_tel,ReceiverPhone,Pur_telno,phone,ReceiverPhone,epdcl2,string,true,
15
+ receiver_address,收件人地址,ReceiverAddress,receiver_address,ReceiverAddress,Address,address,ReceiverAddress,eaddr1,string,false,宅配必填
16
+ receiver_store_id,收件門市代號,ReceiverStoreID,receiver_store_code,ReceiverStoreID,(透過 Emap 選店回傳),store_id,ReceiverStoreID,(N/A),string,false,超商必填;SmilePay/PayNow/PChomePay 透過電子地圖選店 callback 回傳
17
+ return_store_id,退貨門市代號,ReturnStoreID,return_store_code,ReturnStoreID,(無),return_store_id,(無),(N/A),string,false,
18
+ is_collection,是否代收,IsCollection,is_collection,N/A,(由 Pay_zg 決定),(由 pay_type 決定),(由 IsCOD/Y/N 決定),epaytype=2,string,false,SmilePay 從 Pay_zg 51/55/81 (COD) vs 52/56/82 (PICKUP) 判斷
19
+ collection_amount,代收金額,CollectionAmount,collection_amount,N/A,Amount,(via 金流),Amount,eamtcod,integer,false,
20
+ temperature,溫層,Temperature,temperature,Temperature,Temperature (1/2/3),(透過 logistic_type),(內含於 ServiceID),eshipment,string,false,1常溫 2冷藏 3冷凍;PayNow 透過產品線細分
21
+ weight,重量,(N/A),(N/A),(N/A),(N/A),(N/A),(N/A),eweight,integer,false,HCT 直連必填;其他 aggregator 通常自動分箱
22
+ package_count,件數,(N/A),(N/A),(N/A),(N/A),(N/A),(N/A),eqmny,integer,false,HCT 必填
23
+ server_reply_url,通知網址,ServerReplyURL,notify_url,NotifyURL,Roturl,(後台設定),ReturnURL,(N/A — 用 webhook),string,true,HCT 直連靠主動查詢,無 push notify
@@ -33,3 +33,57 @@ payuni,206,退貨中,Return in Progress,returning,退貨流程進行中,
33
33
  payuni,207,退貨完成,Return Completed,returned,退貨已完成,
34
34
  payuni,400,訂單錯誤,Order Error,error,訂單資料錯誤,檢查訂單參數
35
35
  payuni,500,系統錯誤,System Error,error,系統發生錯誤,聯繫客服
36
+ smilepay,1,Status 1,Success,success,SmilePay 取號或操作成功,
37
+ smilepay,21,待出貨,Awaiting Shipment,pending,商家尚未交件給物流商,商家備貨後交件
38
+ smilepay,22,物流驗收中,Logistics Inspection,in_transit,物流中心收件並驗收,自動轉入配送
39
+ smilepay,31,配送中,In Transit,in_transit,商品配送中(C2C 可能於此階段門市關轉),
40
+ smilepay,32,待取貨,At Store,at_store,包裹已配達門市,等待消費者取貨,通知消費者
41
+ smilepay,33,異常訂單,Anomaly,error,配送過程發生異常,聯繫物流商
42
+ smilepay,11,已取貨,Picked Up,completed,消費者已至超商取貨,
43
+ smilepay,41,已取消,Cancelled,cancelled,訂單已被商家取消,
44
+ smilepay,43,賠償訂單,Compensation,error,物流中心 / 黑貓宅配確認賠償訂單產生,跟進賠償流程
45
+ smilepay,44,包裹遺失,Lost,error,包裹經 18 天協尋後無法找到,走遺失賠償流程
46
+ smilepay,51,一般退貨,Standard Return,returning,退貨便 / 黑貓退貨,
47
+ smilepay,52,買家未取,Customer Not Picked,returning,買家超過取貨期限未取件,通知商家
48
+ smilepay,53,廠退,Vendor Return,returning,包裹退回物流中心 / 黑貓集貨所,
49
+ smilepay,55,賣家未取,Vendor Not Picked,returning,商店未於期限內至退貨門市領取,
50
+ smilepay,81,門市關轉,Store Closed,error,門市暫歇,需重選其他可配達門市,通知消費者重選
51
+ pchomepay,SSND,出貨成功,Sender Shipped,in_transit,商家已交件並出貨,
52
+ pchomepay,SATB,送達門市,Arrived,at_store,包裹已配達取貨門市,通知取貨
53
+ pchomepay,RATC,已取貨,Received,completed,消費者已取貨完成,
54
+ pchomepay,LINT,配送中,In Transit,in_transit,物流配送中,
55
+ pchomepay,LGNO,出貨單未產生,No Shipment,pending,尚未取得出貨單編號,呼叫 /v1/logistic/batch
56
+ pchomepay,WD,退倉,Returned to Warehouse,returning,包裹未取貨已退倉,
57
+ pchomepay,90001,取號失敗,Get Shipment Failed,error,呼叫 /v1/logistic/batch 失敗,檢查 store_id 與必填欄位
58
+ pchomepay,90002,門市不存在,Store Not Found,error,提供的 store_id 在系統中不存在,使用 PChomePay 提供之門市清單
59
+ pchomepay,90004,訂單尚無物流,No Logistic,error,該訂單尚未呼叫過取號 API,呼叫 /v1/logistic/batch 取號
60
+ paynow,1,Success,Success,success,PayNow 物流操作成功,
61
+ paynow,M01,商家代號錯誤,Invalid merID,error,merID 在系統中不存在,確認商家代號
62
+ paynow,A01,加密驗證失敗,Auth Failed,error,3DES 加密或 PassCode 驗證失敗,檢查 24-byte Key + 8-byte IV
63
+ paynow,B01,訂單金額錯誤,Invalid Amount,error,Amount 超出範圍或格式錯誤,確認金額為正整數
64
+ paynow,C01,訂單編號重複,Duplicate Order,error,paymentNo 已存在,使用唯一訂單編號
65
+ paynow,LS01,7-11 大宗已出貨,7-11 Shipped,in_transit,7-11 大宗 B2C 已出貨,
66
+ paynow,LS02,7-11 已配達門市,7-11 At Store,at_store,7-11 包裹已配達取貨門市,
67
+ paynow,LS03,7-11 已取貨,7-11 Picked,completed,7-11 消費者取貨完成,
68
+ paynow,LS11,全家已出貨,FAMI Shipped,in_transit,全家大宗 B2C 已出貨,
69
+ paynow,LS12,全家已配達門市,FAMI At Store,at_store,
70
+ paynow,LS13,全家已取貨,FAMI Picked,completed,
71
+ paynow,LS21,黑貓已出貨,TCAT Shipped,in_transit,黑貓宅配已出貨,
72
+ paynow,LS22,黑貓配達中,TCAT In Transit,in_transit,
73
+ paynow,LS23,黑貓配達完成,TCAT Delivered,delivered,
74
+ paynow,LE01,異常訂單,Anomaly,error,配送異常,聯繫客服
75
+ paynow,LR01,退貨完成,Return Done,returned,
76
+ hct,集貨,Picked Up,Picked Up,picked_up,HCT 已收件,
77
+ hct,卸集貨,Unloaded,Unloaded,in_transit,包裹進入轉運站,
78
+ hct,發送,Dispatched,Dispatched,in_transit,包裹從站所發送,
79
+ hct,到著,Arrived,Arrived,in_transit,包裹到達目的地站所,
80
+ hct,配達,Delivered,Delivered,delivered,司機已送達收件人,
81
+ hct,持回,Hold,On Hold,error,司機持回(收件人不在或拒收),聯繫收件人
82
+ hct,派遣,Dispatching,Dispatching,in_transit,司機派遣中,
83
+ hct,客戶不在,Customer Absent,Customer Absent,error,司機到達但客戶不在,
84
+ hct,已取,Picked,Picked,completed,自取站所已取件,
85
+ hct,誤派,Misdelivered,Misrouted,error,派送至錯誤站所,系統重新分配
86
+ hct,址誤,Address Error,Address Error,error,地址錯誤無法配送,聯繫商家更正地址
87
+ hct,拒收退回,Refused,Refused Return,returned,收件人拒收,包裹退回,
88
+ hct,商品保留不退,Hold No Return,Held No Return,on_hold,商品保留不退回,聯繫商家
89
+ hct,公司行號休息,Office Closed,Office Closed,error,公司行號休息日無法配送,延後重新配送