taiwan-payment-skill 1.3.0 → 1.3.1

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.
package/README.md CHANGED
@@ -1,201 +1,130 @@
1
- <h1 align="center">taiwan-payment-skill</h1>
2
-
3
- <h3 align="center">台灣金流 AI 開發技能包</h3>
4
-
5
- <p align="center">
6
- <strong>支援 ECPay 綠界 · NewebPay 藍新 · PAYUNi 統一 · SmilePay 速買配 · PChomePay 拍錢包 · ezPay 簡單付 · PayNow 立吉富</strong>
7
- </p>
8
-
9
- <p align="center">
10
- <a href="https://www.npmjs.com/package/taiwan-payment-skill"><img src="https://img.shields.io/npm/v/taiwan-payment-skill?style=flat-square&logo=npm" alt="npm version"></a>
11
- <a href="https://www.npmjs.com/package/taiwan-payment-skill"><img src="https://img.shields.io/npm/dm/taiwan-payment-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">
14
- <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
- </p>
16
-
17
- <p align="center">
18
- <a href="https://paypal.me/cccsubcom"><img src="https://img.shields.io/badge/PayPal-支持開發-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal"></a>
19
- </p>
20
-
21
- ---
22
-
23
- ## 安裝
24
-
25
- ```bash
26
- npm install -g taiwan-payment-skill
27
- ```
28
-
29
- ---
30
-
31
- ## 使用方式
32
-
33
- ```bash
34
- # 進入專案目錄
35
- cd /path/to/your/project
36
-
37
- # 選擇你的 AI 助手
38
- taiwan-payment init --ai claude # Claude Code
39
- taiwan-payment init --ai cursor # Cursor
40
- taiwan-payment init --ai windsurf # Windsurf
41
- taiwan-payment init --ai copilot # GitHub Copilot
42
- taiwan-payment init --ai antigravity # Antigravity
43
- taiwan-payment init --ai all # 全部安裝
44
- ```
45
-
46
- <details>
47
- <summary>完整平台列表</summary>
48
-
49
- ```bash
50
- taiwan-payment init --ai kiro # Kiro (AWS)
51
- taiwan-payment init --ai codex # Codex CLI (OpenAI)
52
- taiwan-payment init --ai qoder # Qoder
53
- taiwan-payment init --ai roocode # Roo Code
54
- taiwan-payment init --ai gemini # Gemini CLI
55
- taiwan-payment init --ai trae # Trae (ByteDance)
56
- taiwan-payment init --ai opencode # OpenCode
57
- taiwan-payment init --ai continue # Continue
58
- taiwan-payment init --ai codebuddy # CodeBuddy (Tencent)
59
- ```
60
-
61
- </details>
62
-
63
- ---
64
-
65
- ## 其他指令
66
-
67
- ```bash
68
- taiwan-payment list # 列出支援平台
69
- taiwan-payment info # 顯示技能資訊
70
- taiwan-payment versions # 列出可用版本
71
- taiwan-payment update # 檢查更新
72
- ```
73
-
74
- ### 選項
75
-
76
- ```bash
77
- taiwan-payment init --force # 覆蓋現有檔案
78
- taiwan-payment init --global # 安裝到全域目錄(所有專案共用)
79
- ```
80
-
81
- ### 全域安裝
82
-
83
- 使用 `--global` 可將技能安裝到使用者目錄,讓所有專案都能使用:
84
-
85
- ```bash
86
- taiwan-payment init --ai cursor --global # ~/.cursor/skills/taiwan-payment/
87
- taiwan-payment init --ai claude --global # ~/.claude/skills/taiwan-payment/
88
- taiwan-payment init --ai antigravity --global # ~/.gemini/antigravity/global_skills/taiwan-payment/
89
- ```
90
-
91
- ---
92
-
93
- ## 支援平台
94
-
95
- | 平台 | 說明 | 啟動方式 |
96
- |------|------|----------|
97
- | **Claude Code** | Anthropic 官方 CLI | `/taiwan-payment` |
98
- | **Cursor** | AI 程式編輯器 | `/taiwan-payment` |
99
- | **Windsurf** | Codeium 編輯器 | 自動 |
100
- | **Copilot** | GitHub Copilot | `/taiwan-payment` |
101
- | **Antigravity** | Google AI 助手 | `/taiwan-payment` |
102
- | **Kiro** | AWS AI 助手 | `/taiwan-payment` |
103
- | **Codex** | OpenAI CLI | 自動 |
104
- | **Qoder** | Qodo AI 助手 | 自動 |
105
- | **RooCode** | VSCode 擴充 | `/taiwan-payment` |
106
- | **Gemini CLI** | Google Gemini | 自動 |
107
- | **Trae** | ByteDance AI | 自動 |
108
- | **OpenCode** | 開源 AI 助手 | 自動 |
109
- | **Continue** | 開源 AI 助手 | 自動 |
110
- | **CodeBuddy** | Tencent AI | 自動 |
111
-
112
- ---
113
-
114
- ## 金流服務商
115
-
116
- | 服務商 | 加密方式 | API 風格 | 特點 |
117
- |--------|---------|---------|------|
118
- | **ECPay 綠界** | URL Encode + SHA256 | Form POST | 市佔率最高,穩定性佳 |
119
- | **NewebPay 藍新** | AES-256-CBC + SHA256 | Form POST + AES | 支援最多支付方式 (13 種) |
120
- | **PAYUNi 統一** | AES-256-GCM + SHA256 | RESTful JSON | RESTful 設計,API 現代化 |
121
- | **SmilePay 速買配** | Verify_key + Mid_smilepay 加權檢核碼 | Form POST + XML 回應 | 老牌、簡單、無 AES 加密門檻 |
122
- | **PChomePay 拍錢包** | HTTP Basic Auth → pcpay-token | RESTful JSON | PChome 生態、5% P 幣回饋、自帶超商取貨物流 |
123
- | **ezPay 簡單付** | 同 NewebPay (AES-256-CBC + SHA256) | Form POST + AES | 藍新小型商家品牌,跨境支付寶/微信 |
124
- | **PayNow 立吉富** | JWT Bearer (現代) / 動態 AES-256 (傳統) | RESTful JSON / Form POST | 雙 API 並行,Apple Pay 完整支援(含延遲扣款) |
125
-
126
- ---
127
-
128
- ## 付款方式支援
129
-
130
- ### 信用卡支付
131
- - 一次付清、分期付款 (3/6/12/18/24 期)
132
- - 信用卡定期定額、信用卡記憶
133
-
134
- ### 電子錢包
135
- - Apple Pay、Google Pay、Samsung Pay
136
- - LINE Pay、台灣 Pay
137
-
138
- ### 轉帳支付
139
- - 網路 ATM、ATM 虛擬帳號
140
-
141
- ### 超商支付
142
- - 超商代碼、超商條碼
143
-
144
- ### 其他
145
- - TWQR、BNPL 無卡分期、AFTEE 先享後付
146
-
147
- ---
148
-
149
- ## 智能工具
150
-
151
- 安裝後包含以下 Python 工具(純 Python,無需外部依賴):
152
-
153
- ```bash
154
- # BM25 搜索引擎 - 搜索錯誤碼、欄位映射、付款方式
155
- python scripts/search.py "10100058" --domain error
156
- python scripts/search.py "信用卡" --domain payment_method
157
- python scripts/search.py "CheckMacValue" --domain troubleshoot
158
-
159
- # 智能推薦系統 - 根據需求推薦金流服務商
160
- python scripts/recommend.py "高交易量 電商 穩定"
161
- python scripts/recommend.py "多元支付 LINE Pay Apple Pay"
162
-
163
- # 連線測試工具 - 測試 API 連線
164
- python scripts/test_payment.py ecpay
165
- python scripts/test_payment.py all
166
- ```
167
-
168
- ### 搜索域
169
-
170
- - `provider` - 服務商比較
171
- - `operation` - API 操作端點
172
- - `error` - 錯誤碼查詢
173
- - `field` - 欄位映射
174
- - `payment_method` - 付款方式
175
- - `troubleshoot` - 疑難排解
176
- - `reasoning` - 推薦決策規則
177
-
178
- ---
179
-
180
- ## 功能特色
181
-
182
- - 完整 API 文檔 (ECPay, NewebPay, PAYUNi, SmilePay, PChomePay, ezPay, PayNow)
183
- - BM25 搜索引擎
184
- - 智能推薦系統
185
- - 7 個 Python 範例(每家服務商一個)
186
- - 7 個 CSV 數據檔 (易於維護)
187
- - 加密實作指南 (SHA256, AES-128-CBC, AES-256-CBC, AES-256-GCM, JWT, 動態 AES, Basic Auth → Token)
188
- - 16+ 個疑難排解案例
189
-
190
- ---
191
-
192
- ## 授權
193
-
194
- [MIT License](https://github.com/Moksa1123/taiwan-payment/blob/main/LICENSE)
195
-
196
- ---
197
-
198
- <p align="center">
199
- <sub>Made by <strong>Moksa</strong></sub><br>
200
- <sub>service@moksaweb.com</sub>
201
- </p>
1
+ <h1 align="center">taiwan-payment-skill</h1>
2
+
3
+ <h3 align="center">台灣金流 AI 開發技能包</h3>
4
+
5
+ <p align="center">
6
+ <strong>10 大金流平台一次串接</strong>
7
+ </p>
8
+
9
+ <p align="center">
10
+ ECPay · NewebPay · PAYUNi · SmilePay · PChomePay · ezPay · PayNow · Shopline · LINE Pay · TapPay
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://www.npmjs.com/package/taiwan-payment-skill"><img src="https://img.shields.io/npm/v/taiwan-payment-skill?style=flat-square&logo=npm" alt="npm version"></a>
15
+ <a href="https://www.npmjs.com/package/taiwan-payment-skill"><img src="https://img.shields.io/npm/dm/taiwan-payment-skill?style=flat-square&label=downloads" alt="npm downloads"></a>
16
+ <img src="https://img.shields.io/badge/providers-10-success?style=flat-square" alt="10 Providers">
17
+ <img src="https://img.shields.io/badge/AI%20platforms-14-blue?style=flat-square" alt="14 AI Platforms">
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>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="https://paypal.me/cccsubcom"><img src="https://img.shields.io/badge/PayPal-支持開發-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal"></a>
23
+ </p>
24
+
25
+ ---
26
+
27
+ ## 安裝
28
+
29
+ ```bash
30
+ npm install -g taiwan-payment-skill
31
+ ```
32
+
33
+ ## 快速開始
34
+
35
+ ```bash
36
+ cd /path/to/your/project
37
+
38
+ taiwan-payment init # 互動式
39
+ taiwan-payment init --ai claude # Claude Code
40
+ taiwan-payment init --ai cursor # Cursor
41
+ taiwan-payment init --ai windsurf # Windsurf
42
+ taiwan-payment init --ai all # 全部安裝
43
+ ```
44
+
45
+ 安裝完後,AI 助手裡用自然語言:
46
+
47
+ ```
48
+ 建立 ECPay 信用卡付款訂單,金額 2500 元
49
+ NewebPay MPG 整合 LINE Pay + Apple Pay
50
+ PChomePay 拍錢包訂單,5% P 幣回饋
51
+ PayNow PaymentIntent,啟用 LINE Pay 線上+線下扣款
52
+ TapPay 用 Prime 一次付清,remember=true 存成 card_token 供下次自動扣款
53
+ ```
54
+
55
+ ---
56
+
57
+ ## 10 家金流平台
58
+
59
+ | 服務商 | 加密 / 認證 | 特色 |
60
+ |---|---|---|
61
+ | **ECPay 綠界** | SHA256 CheckMacValue | 市佔率最高、文檔最完整 |
62
+ | **NewebPay 藍新** | AES-256-CBC + SHA256 | MPG 整合、信用卡記憶、13 種支付 |
63
+ | **PAYUNi 統一** | AES-256-GCM + SHA256 | RESTful JSON、AFTEE、iCash |
64
+ | **SmilePay 速買配** | Verify_key + 加權檢核碼 | 無 AES、ibon / FamiPort 直接打單 |
65
+ | **PChomePay 拍錢包** | Basic Auth → 8h pcpay-token | PChome 生態、5% P 幣回饋、金物流二合一 |
66
+ | **ezPay 簡單付** | 同 NewebPay (AES-256-CBC) | 藍新小型商家品牌、低門檻 |
67
+ | **PayNow 立吉富** | JWT Bearer (現代) / 動態 AES-256 (傳統) | 雙 API、Stripe-like、Apple Pay 完整 |
68
+ | **Shopline Payments** | merchantId + apiKey | 金額以分為單位、HMAC-SHA256 webhook |
69
+ | **LINE Pay v4** | Channel ID/Secret + HMAC-SHA256 + Nonce | Request→Confirm 兩段、Preapproved Pay |
70
+ | **TapPay** | Partner Key (Header) | PCI 隔離、Prime 兩段式、Card Token |
71
+
72
+ 每家附完整 Python 範例 + 反推的加密實作 + 錯誤碼對照 + 測試帳號。
73
+
74
+ ## 技能包內容
75
+
76
+ ```
77
+ taiwan-payment/
78
+ ├── SKILL.md # AI 技能主文檔
79
+ ├── EXAMPLES.md # 實戰範例集
80
+ ├── references/ # 10 份 API 規格 (~9,200 行)
81
+ │ ├── ecpay-payment-api.md
82
+ │ ├── newebpay-payment-api.md
83
+ │ ├── payuni-payment-api.md
84
+ │ ├── smilepay-payment-api.md # 反推 Mid_smilepay 加權檢核碼
85
+ │ ├── pchomepay-payment-api.md # 含 8h token 流程
86
+ │ ├── ezpay-payment-api.md # diff vs Newebpay
87
+ │ ├── paynow-payment-api.md # 雙 API 並行
88
+ │ ├── shopline-payment-api.md # Redirect + Embedded
89
+ │ ├── linepay-payment-api.md # HMAC + Preapproved
90
+ │ └── tappay-payment-api.md # Prime + Token 重複扣款
91
+ ├── examples/ # 10 個生產級 Python 範例
92
+ └── data/ # 7 份 CSV
93
+ ├── providers.csv # 10 服務商完整比較
94
+ ├── operations.csv # 26 個 API 操作
95
+ ├── payment-methods.csv # 25+ 支付方式對照
96
+ ├── error-codes.csv # 130+ 錯誤碼
97
+ └── ...
98
+ ```
99
+
100
+ ## CLI 指令
101
+
102
+ ```bash
103
+ taiwan-payment list # 列出 AI 平台
104
+ taiwan-payment info # 技能資訊
105
+ taiwan-payment update # 檢查更新
106
+ taiwan-payment init --force # 覆蓋安裝
107
+ taiwan-payment init --global # 全域安裝
108
+ ```
109
+
110
+ ## 14 個 AI 平台支援
111
+
112
+ Claude Code · Cursor · Windsurf · Antigravity · GitHub Copilot · Kiro · Codex · Qoder · Roo Code · Gemini · Trae · OpenCode · Continue · CodeBuddy
113
+
114
+ ## 相關套件
115
+
116
+ 本套件是 **[Taiwan E-Commerce Toolkit](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)** 的一部分:
117
+
118
+ - [taiwan-invoice-skill](https://www.npmjs.com/package/taiwan-invoice-skill) — 5 家電子發票
119
+ - [taiwan-logistics-skill](https://www.npmjs.com/package/taiwan-logistics-skill) — 7 家物流(含 HCT 直連)
120
+
121
+ ## 授權
122
+
123
+ [MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
124
+
125
+ ---
126
+
127
+ <p align="center">
128
+ <sub>Made by <strong>Moksa</strong></sub><br>
129
+ <sub>service@moksaweb.com</sub>
130
+ </p>