taiwan-payment-skill 1.3.0 → 1.3.2
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 +66 -137
- package/assets/taiwan-payment/README.md +65 -330
- package/assets/taiwan-payment/data/payment-methods.csv +11 -0
- package/assets/taiwan-payment/examples/linepay-payment-example.py +305 -305
- package/assets/taiwan-payment/examples/shopline-payment-example.py +291 -291
- package/assets/taiwan-payment/examples/tappay-payment-example.py +337 -337
- package/assets/taiwan-payment/references/ecpay-payment-api.md +53 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,14 +3,18 @@
|
|
|
3
3
|
<h3 align="center">台灣金流 AI 開發技能包</h3>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong
|
|
6
|
+
<strong>10 大金流平台一次串接</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
ECPay · NewebPay · PAYUNi · SmilePay · PChomePay · ezPay · PayNow · Shopline · LINE Pay · TapPay
|
|
7
11
|
</p>
|
|
8
12
|
|
|
9
13
|
<p align="center">
|
|
10
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>
|
|
11
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>
|
|
12
|
-
<img src="https://img.shields.io/badge/
|
|
13
|
-
<img src="https://img.shields.io/badge/
|
|
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">
|
|
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
|
|
|
@@ -26,172 +30,97 @@
|
|
|
26
30
|
npm install -g taiwan-payment-skill
|
|
27
31
|
```
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## 使用方式
|
|
33
|
+
## 快速開始
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
|
-
# 進入專案目錄
|
|
35
36
|
cd /path/to/your/project
|
|
36
37
|
|
|
37
|
-
#
|
|
38
|
+
taiwan-payment init # 互動式
|
|
38
39
|
taiwan-payment init --ai claude # Claude Code
|
|
39
40
|
taiwan-payment init --ai cursor # Cursor
|
|
40
41
|
taiwan-payment init --ai windsurf # Windsurf
|
|
41
|
-
taiwan-payment init --ai copilot # GitHub Copilot
|
|
42
|
-
taiwan-payment init --ai antigravity # Antigravity
|
|
43
42
|
taiwan-payment init --ai all # 全部安裝
|
|
44
43
|
```
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
<summary>完整平台列表</summary>
|
|
45
|
+
安裝完後,AI 助手裡用自然語言:
|
|
48
46
|
|
|
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
47
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## 其他指令
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
taiwan-payment list # 列出支援平台
|
|
69
|
-
taiwan-payment info # 顯示技能資訊
|
|
70
|
-
taiwan-payment versions # 列出可用版本
|
|
71
|
-
taiwan-payment update # 檢查更新
|
|
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 供下次自動扣款
|
|
72
53
|
```
|
|
73
54
|
|
|
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
55
|
---
|
|
127
56
|
|
|
128
|
-
##
|
|
57
|
+
## 10 家金流平台
|
|
129
58
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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 |
|
|
133
71
|
|
|
134
|
-
|
|
135
|
-
- Apple Pay、Google Pay、Samsung Pay
|
|
136
|
-
- LINE Pay、台灣 Pay
|
|
72
|
+
每家附完整 Python 範例 + 反推的加密實作 + 錯誤碼對照 + 測試帳號。
|
|
137
73
|
|
|
138
|
-
|
|
139
|
-
- 網路 ATM、ATM 虛擬帳號
|
|
74
|
+
## 技能包內容
|
|
140
75
|
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
+
```
|
|
150
99
|
|
|
151
|
-
|
|
100
|
+
## CLI 指令
|
|
152
101
|
|
|
153
102
|
```bash
|
|
154
|
-
#
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
103
|
+
taiwan-payment list # 列出 AI 平台
|
|
104
|
+
taiwan-payment info # 技能資訊
|
|
105
|
+
taiwan-payment update # 檢查更新
|
|
106
|
+
taiwan-payment init --force # 覆蓋安裝
|
|
107
|
+
taiwan-payment init --global # 全域安裝
|
|
166
108
|
```
|
|
167
109
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- `provider` - 服務商比較
|
|
171
|
-
- `operation` - API 操作端點
|
|
172
|
-
- `error` - 錯誤碼查詢
|
|
173
|
-
- `field` - 欄位映射
|
|
174
|
-
- `payment_method` - 付款方式
|
|
175
|
-
- `troubleshoot` - 疑難排解
|
|
176
|
-
- `reasoning` - 推薦決策規則
|
|
110
|
+
## 14 個 AI 平台支援
|
|
177
111
|
|
|
178
|
-
|
|
112
|
+
Claude Code · Cursor · Windsurf · Antigravity · GitHub Copilot · Kiro · Codex · Qoder · Roo Code · Gemini · Trae · OpenCode · Continue · CodeBuddy
|
|
179
113
|
|
|
180
|
-
##
|
|
114
|
+
## 相關套件
|
|
181
115
|
|
|
182
|
-
|
|
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+ 個疑難排解案例
|
|
116
|
+
本套件是 **[Taiwan E-Commerce Toolkit](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)** 的一部分:
|
|
189
117
|
|
|
190
|
-
|
|
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 直連)
|
|
191
120
|
|
|
192
121
|
## 授權
|
|
193
122
|
|
|
194
|
-
[MIT License](https://github.com/Moksa1123/taiwan-
|
|
123
|
+
[MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
|
|
195
124
|
|
|
196
125
|
---
|
|
197
126
|
|