taiwan-payment-skill 1.5.13 → 1.5.14

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 (73) hide show
  1. package/README.md +139 -139
  2. package/assets/taiwan-payment/CLAUDE.md +339 -339
  3. package/assets/taiwan-payment/EXAMPLES.md +1392 -1392
  4. package/assets/taiwan-payment/README.md +139 -139
  5. package/assets/taiwan-payment/SKILL.md +151 -881
  6. package/assets/taiwan-payment/data/error-codes-payuni-1.csv +786 -786
  7. package/assets/taiwan-payment/data/error-codes-payuni-2.csv +719 -719
  8. package/assets/taiwan-payment/data/error-codes-tappay.csv +474 -474
  9. package/assets/taiwan-payment/data/error-codes.csv +1004 -1004
  10. package/assets/taiwan-payment/data/field-mappings.csv +20 -20
  11. package/assets/taiwan-payment/data/operations.csv +26 -26
  12. package/assets/taiwan-payment/data/payment-methods.csv +42 -42
  13. package/assets/taiwan-payment/data/pending.csv +8 -0
  14. package/assets/taiwan-payment/data/providers.csv +15 -15
  15. package/assets/taiwan-payment/data/reasoning.csv +46 -46
  16. package/assets/taiwan-payment/data/troubleshooting.csv +47 -47
  17. package/assets/taiwan-payment/evals/RESULTS.md +33 -0
  18. package/assets/taiwan-payment/evals/cases.json +193 -0
  19. package/assets/taiwan-payment/evals/grade.py +121 -0
  20. package/assets/taiwan-payment/examples/ecpay-payment-example.py +415 -415
  21. package/assets/taiwan-payment/examples/ezpay-payment-example.py +366 -366
  22. package/assets/taiwan-payment/examples/jkopay-payment-example.py +316 -316
  23. package/assets/taiwan-payment/examples/linepay-payment-example.py +310 -310
  24. package/assets/taiwan-payment/examples/newebpay-payment-example.py +607 -607
  25. package/assets/taiwan-payment/examples/paynow-payment-example.py +767 -767
  26. package/assets/taiwan-payment/examples/payuni-payment-example.py +301 -301
  27. package/assets/taiwan-payment/examples/pchomepay-payment-example.py +555 -555
  28. package/assets/taiwan-payment/examples/shopline-payment-example.py +290 -290
  29. package/assets/taiwan-payment/examples/smilepay-payment-example.py +673 -673
  30. package/assets/taiwan-payment/examples/sunpay-payment-example.py +343 -343
  31. package/assets/taiwan-payment/examples/tappay-payment-example.py +336 -336
  32. package/assets/taiwan-payment/references/ecpay-payment-api.md +502 -502
  33. package/assets/taiwan-payment/references/ezpay-payment-api.md +460 -460
  34. package/assets/taiwan-payment/references/gomypay-payment-api.md +50 -50
  35. package/assets/taiwan-payment/references/implementation-guide.md +768 -0
  36. package/assets/taiwan-payment/references/jkopay-payment-api.md +840 -840
  37. package/assets/taiwan-payment/references/linepay-payment-api.md +930 -930
  38. package/assets/taiwan-payment/references/newebpay-payment-api.md +829 -829
  39. package/assets/taiwan-payment/references/opay-payment-api.md +565 -565
  40. package/assets/taiwan-payment/references/paynow-payment-api.md +1651 -1651
  41. package/assets/taiwan-payment/references/payuni-payment-api.md +847 -847
  42. package/assets/taiwan-payment/references/pchomepay-payment-api.md +1428 -1428
  43. package/assets/taiwan-payment/references/shopline-payment-api.md +1524 -1524
  44. package/assets/taiwan-payment/references/smilepay-payment-api.md +907 -907
  45. package/assets/taiwan-payment/references/sunpay-payment-api.md +467 -467
  46. package/assets/taiwan-payment/references/tappay-payment-api.md +1243 -1243
  47. package/assets/taiwan-payment/references/twqr-ewallet-landscape.md +159 -159
  48. package/assets/taiwan-payment/requirements.txt +4 -0
  49. package/assets/taiwan-payment/scripts/check_numbers.py +147 -0
  50. package/assets/taiwan-payment/scripts/core.py +368 -351
  51. package/assets/taiwan-payment/scripts/recommend.py +288 -288
  52. package/assets/taiwan-payment/scripts/search.py +200 -187
  53. package/assets/taiwan-payment/scripts/test_payment.py +395 -373
  54. package/assets/taiwan-payment/scripts/test_recommend.py +114 -114
  55. package/assets/taiwan-payment/scripts/test_skill.py +202 -0
  56. package/assets/templates/base/quick-reference.md +70 -70
  57. package/assets/templates/base/skill-content.md +147 -875
  58. package/assets/templates/platforms/agent.json +26 -26
  59. package/assets/templates/platforms/claude.json +26 -26
  60. package/assets/templates/platforms/cline.json +26 -26
  61. package/assets/templates/platforms/codebuddy.json +25 -25
  62. package/assets/templates/platforms/codex.json +26 -26
  63. package/assets/templates/platforms/continue.json +25 -25
  64. package/assets/templates/platforms/copilot.json +25 -25
  65. package/assets/templates/platforms/cursor.json +26 -26
  66. package/assets/templates/platforms/gemini.json +25 -25
  67. package/assets/templates/platforms/kiro.json +25 -25
  68. package/assets/templates/platforms/opencode.json +25 -25
  69. package/assets/templates/platforms/qoder.json +25 -25
  70. package/assets/templates/platforms/trae.json +25 -25
  71. package/assets/templates/platforms/windsurf.json +25 -25
  72. package/dist/index.js +10 -1
  73. package/package.json +67 -67
package/README.md CHANGED
@@ -1,139 +1,139 @@
1
- <h1 align="center">taiwan-payment-skill</h1>
2
-
3
- <h3 align="center">台灣金流 AI 開發技能包</h3>
4
-
5
- <p align="center">
6
- <strong>14 家金流平台一次串接</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-14-success?style=flat-square" alt="14 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
- ## 14 家金流平台
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 簡單付** | AES-256-CBC(32-byte padding)+ SHA256 | 電子支付機構;境內 TWQR / ezPay 錢包,跨境支付寶 / 微信 |
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
- | **O'Pay 歐付寶** | SHA256 CheckMacValue(同 ECPay) | 與 ECPay 同源架構、AccountLink 銀行快付、延遲撥款 |
72
- | **JKOPAY 街口** | api-key Header + HMAC-SHA256 digest | 線上支付 / POS / 授權扣款 |
73
- | **SunPay 紅陽** | RSA 分段加密 + SHA256 check_value | 金流 + 發票 + 超商代收 |
74
- | **GoMyPay** | 需向 GoMyPay 申請規格 | 完整 API 規格未公開 |
75
-
76
- O'Pay、GoMyPay 以外皆附可執行 Python 範例,加解密以官方測試向量驗證;錯誤碼見 `data/error-codes*.csv`。
77
-
78
- ## 技能包內容
79
-
80
- ```
81
- taiwan-payment/
82
- ├── SKILL.md # AI 技能主文檔
83
- ├── EXAMPLES.md # 實戰範例集
84
- ├── references/ # 各服務商 API 規格
85
- │ ├── ecpay-payment-api.md
86
- │ ├── newebpay-payment-api.md
87
- │ ├── payuni-payment-api.md
88
- │ ├── smilepay-payment-api.md # Mid_smilepay 加權檢核碼
89
- │ ├── pchomepay-payment-api.md # 含 8h token 流程
90
- │ ├── ezpay-payment-api.md # 電子支付平台 + 跨境(依官方手冊)
91
- │ ├── paynow-payment-api.md # 雙 API 並行
92
- │ ├── shopline-payment-api.md # Redirect + Embedded
93
- │ ├── linepay-payment-api.md # HMAC + Preapproved
94
- │ ├── tappay-payment-api.md # Prime + Token 重複扣款
95
- │ ├── opay-payment-api.md
96
- │ ├── jkopay-payment-api.md
97
- │ ├── sunpay-payment-api.md
98
- │ ├── gomypay-payment-api.md
99
- │ └── twqr-ewallet-landscape.md # 電子支付/TWQR 生態
100
- ├── examples/ # 可執行 Python 範例
101
- └── data/ # search / recommend 使用的 CSV
102
- ├── providers.csv
103
- ├── operations.csv
104
- ├── payment-methods.csv
105
- ├── error-codes*.csv # 各家官方錯誤碼(依 256 KiB 上限分檔)
106
- └── ...
107
- ```
108
-
109
- ## CLI 指令
110
-
111
- ```bash
112
- taiwan-payment list # 列出 AI 平台
113
- taiwan-payment info # 技能資訊
114
- taiwan-payment update # 檢查更新
115
- taiwan-payment init --force # 覆蓋安裝
116
- taiwan-payment init --global # 全域安裝
117
- ```
118
-
119
- ## 14 個 AI 平台支援
120
-
121
- Claude Code · Cursor · Windsurf · Antigravity · GitHub Copilot · Kiro · Codex · Qoder · Cline · Gemini · Trae · OpenCode · Continue · CodeBuddy
122
-
123
- ## 相關套件
124
-
125
- 本套件是 **[Taiwan E-Commerce Toolkit](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)** 的一部分:
126
-
127
- - [taiwan-invoice-skill](https://www.npmjs.com/package/taiwan-invoice-skill) — 7 家電子發票加值中心 + 財政部大平台查詢
128
- - [taiwan-logistics-skill](https://www.npmjs.com/package/taiwan-logistics-skill) — 7 家物流 aggregator + HCT 直連 + 2 家即時配送
129
-
130
- ## 授權
131
-
132
- [MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
133
-
134
- ---
135
-
136
- <p align="center">
137
- <sub>Made by <strong>Moksa</strong></sub><br>
138
- <sub>service@moksaweb.com</sub>
139
- </p>
1
+ <h1 align="center">taiwan-payment-skill</h1>
2
+
3
+ <h3 align="center">台灣金流 AI 開發技能包</h3>
4
+
5
+ <p align="center">
6
+ <strong>14 家金流平台一次串接</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-14-success?style=flat-square" alt="14 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
+ ## 14 家金流平台
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 簡單付** | AES-256-CBC(32-byte padding)+ SHA256 | 電子支付機構;境內 TWQR / ezPay 錢包,跨境支付寶 / 微信 |
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
+ | **O'Pay 歐付寶** | SHA256 CheckMacValue(同 ECPay) | 與 ECPay 同源架構、AccountLink 銀行快付、延遲撥款 |
72
+ | **JKOPAY 街口** | api-key Header + HMAC-SHA256 digest | 線上支付 / POS / 授權扣款 |
73
+ | **SunPay 紅陽** | RSA 分段加密 + SHA256 check_value | 金流 + 發票 + 超商代收 |
74
+ | **GoMyPay** | 需向 GoMyPay 申請規格 | 完整 API 規格未公開 |
75
+
76
+ O'Pay、GoMyPay 以外皆附可執行 Python 範例,加解密以官方測試向量驗證;錯誤碼見 `data/error-codes*.csv`。
77
+
78
+ ## 技能包內容
79
+
80
+ ```
81
+ taiwan-payment/
82
+ ├── SKILL.md # AI 技能主文檔
83
+ ├── EXAMPLES.md # 實戰範例集
84
+ ├── references/ # 各服務商 API 規格
85
+ │ ├── ecpay-payment-api.md
86
+ │ ├── newebpay-payment-api.md
87
+ │ ├── payuni-payment-api.md
88
+ │ ├── smilepay-payment-api.md # Mid_smilepay 加權檢核碼
89
+ │ ├── pchomepay-payment-api.md # 含 8h token 流程
90
+ │ ├── ezpay-payment-api.md # 電子支付平台 + 跨境(依官方手冊)
91
+ │ ├── paynow-payment-api.md # 雙 API 並行
92
+ │ ├── shopline-payment-api.md # Redirect + Embedded
93
+ │ ├── linepay-payment-api.md # HMAC + Preapproved
94
+ │ ├── tappay-payment-api.md # Prime + Token 重複扣款
95
+ │ ├── opay-payment-api.md
96
+ │ ├── jkopay-payment-api.md
97
+ │ ├── sunpay-payment-api.md
98
+ │ ├── gomypay-payment-api.md
99
+ │ └── twqr-ewallet-landscape.md # 電子支付/TWQR 生態
100
+ ├── examples/ # 可執行 Python 範例
101
+ └── data/ # search / recommend 使用的 CSV
102
+ ├── providers.csv
103
+ ├── operations.csv
104
+ ├── payment-methods.csv
105
+ ├── error-codes*.csv # 各家官方錯誤碼(依 256 KiB 上限分檔)
106
+ └── ...
107
+ ```
108
+
109
+ ## CLI 指令
110
+
111
+ ```bash
112
+ taiwan-payment list # 列出 AI 平台
113
+ taiwan-payment info # 技能資訊
114
+ taiwan-payment update # 檢查更新
115
+ taiwan-payment init --force # 覆蓋安裝
116
+ taiwan-payment init --global # 全域安裝
117
+ ```
118
+
119
+ ## 14 個 AI 平台支援
120
+
121
+ Claude Code · Cursor · Windsurf · Antigravity · GitHub Copilot · Kiro · Codex · Qoder · Cline · Gemini · Trae · OpenCode · Continue · CodeBuddy
122
+
123
+ ## 相關套件
124
+
125
+ 本套件是 **[Taiwan E-Commerce Toolkit](https://github.com/Moksa1123/taiwan-ecommerce-toolkit)** 的一部分:
126
+
127
+ - [taiwan-invoice-skill](https://www.npmjs.com/package/taiwan-invoice-skill) — 7 家電子發票加值中心 + 財政部大平台查詢
128
+ - [taiwan-logistics-skill](https://www.npmjs.com/package/taiwan-logistics-skill) — 7 家物流 aggregator + HCT 直連 + 2 家即時配送
129
+
130
+ ## 授權
131
+
132
+ [MIT License](https://github.com/Moksa1123/taiwan-ecommerce-toolkit/blob/main/LICENSE)
133
+
134
+ ---
135
+
136
+ <p align="center">
137
+ <sub>Made by <strong>Moksa</strong></sub><br>
138
+ <sub>service@moksaweb.com</sub>
139
+ </p>