taiwan-payment-skill 1.3.3 → 1.4.0

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.
Files changed (60) hide show
  1. package/README.md +130 -130
  2. package/assets/taiwan-payment/CLAUDE.md +314 -304
  3. package/assets/taiwan-payment/EXAMPLES.md +1542 -1542
  4. package/assets/taiwan-payment/README.md +130 -130
  5. package/assets/taiwan-payment/SKILL.md +933 -933
  6. package/assets/taiwan-payment/data/error-codes.csv +189 -102
  7. package/assets/taiwan-payment/data/field-mappings.csv +18 -15
  8. package/assets/taiwan-payment/data/operations.csv +23 -23
  9. package/assets/taiwan-payment/data/payment-methods.csv +42 -39
  10. package/assets/taiwan-payment/data/providers.csv +15 -11
  11. package/assets/taiwan-payment/data/reasoning.csv +44 -32
  12. package/assets/taiwan-payment/data/troubleshooting.csv +37 -22
  13. package/assets/taiwan-payment/examples/ecpay-payment-example.py +390 -390
  14. package/assets/taiwan-payment/examples/ezpay-payment-example.py +690 -690
  15. package/assets/taiwan-payment/examples/linepay-payment-example.py +305 -305
  16. package/assets/taiwan-payment/examples/newebpay-payment-example.py +451 -451
  17. package/assets/taiwan-payment/examples/paynow-payment-example.py +767 -767
  18. package/assets/taiwan-payment/examples/payuni-payment-example.py +457 -457
  19. package/assets/taiwan-payment/examples/pchomepay-payment-example.py +556 -556
  20. package/assets/taiwan-payment/examples/shopline-payment-example.py +291 -291
  21. package/assets/taiwan-payment/examples/smilepay-payment-example.py +673 -673
  22. package/assets/taiwan-payment/examples/tappay-payment-example.py +337 -337
  23. package/assets/taiwan-payment/references/ecpay-payment-api.md +933 -933
  24. package/assets/taiwan-payment/references/ezpay-payment-api.md +660 -660
  25. package/assets/taiwan-payment/references/gomypay-payment-api.md +62 -0
  26. package/assets/taiwan-payment/references/jkopay-payment-api.md +600 -0
  27. package/assets/taiwan-payment/references/linepay-payment-api.md +940 -940
  28. package/assets/taiwan-payment/references/newebpay-payment-api.md +677 -677
  29. package/assets/taiwan-payment/references/opay-payment-api.md +265 -0
  30. package/assets/taiwan-payment/references/paynow-payment-api.md +1654 -1654
  31. package/assets/taiwan-payment/references/payuni-payment-api.md +1018 -1018
  32. package/assets/taiwan-payment/references/pchomepay-payment-api.md +1431 -1431
  33. package/assets/taiwan-payment/references/shopline-payment-api.md +1523 -1523
  34. package/assets/taiwan-payment/references/smilepay-payment-api.md +919 -919
  35. package/assets/taiwan-payment/references/sunpay-payment-api.md +369 -0
  36. package/assets/taiwan-payment/references/tappay-payment-api.md +1245 -1245
  37. package/assets/taiwan-payment/references/twqr-ewallet-landscape.md +160 -0
  38. package/assets/taiwan-payment/scripts/core.py +346 -288
  39. package/assets/taiwan-payment/scripts/recommend.py +289 -277
  40. package/assets/taiwan-payment/scripts/search.py +185 -185
  41. package/assets/taiwan-payment/scripts/test_payment.py +358 -358
  42. package/assets/taiwan-payment/scripts/test_recommend.py +114 -0
  43. package/assets/templates/base/quick-reference.md +71 -71
  44. package/assets/templates/base/skill-content.md +928 -928
  45. package/assets/templates/platforms/agent.json +26 -26
  46. package/assets/templates/platforms/antigravity.json +25 -25
  47. package/assets/templates/platforms/claude.json +26 -26
  48. package/assets/templates/platforms/codebuddy.json +25 -25
  49. package/assets/templates/platforms/codex.json +26 -26
  50. package/assets/templates/platforms/continue.json +25 -25
  51. package/assets/templates/platforms/copilot.json +25 -25
  52. package/assets/templates/platforms/cursor.json +26 -26
  53. package/assets/templates/platforms/gemini.json +25 -25
  54. package/assets/templates/platforms/kiro.json +25 -25
  55. package/assets/templates/platforms/opencode.json +25 -25
  56. package/assets/templates/platforms/qoder.json +25 -25
  57. package/assets/templates/platforms/roocode.json +25 -25
  58. package/assets/templates/platforms/trae.json +25 -25
  59. package/assets/templates/platforms/windsurf.json +25 -25
  60. package/package.json +67 -67
package/README.md CHANGED
@@ -1,130 +1,130 @@
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>
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>