newebpay
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese藍新金流整合指南
NewebPay Integration Guide
你的任務是幫助用戶設定藍新金流(NewebPay)環境並引導至適當的串接功能。
Your task is to help users set up the NewebPay environment and guide them to the appropriate integration features.
用戶需求分析
User Requirement Analysis
用戶輸入:
$ARGUMENTS根據用戶需求,判斷下一步:
- 若包含「串接」「checkout」「建立交易」「MPG」→ 引導使用
/newebpay-checkout - 若包含「查詢」「query」「訂單狀態」→ 引導使用
/newebpay-query - 若包含「退款」「refund」「取消」→ 引導使用
/newebpay-refund - 若無特定指定 → 提供以下環境設定引導
User Input:
$ARGUMENTSDetermine the next step based on user requirements:
- If it contains "integration", "checkout", "create transaction", "MPG" → Guide to use
/newebpay-checkout - If it contains "query", "query", "order status" → Guide to use
/newebpay-query - If it contains "refund", "refund", "cancel" → Guide to use
/newebpay-refund - If no specific specification → Provide the following environment setup guidance
環境設定檢查
Environment Setup Check
詢問用戶以下問題:
-
專案框架:你使用什麼框架?
- PHP (Laravel / 原生 PHP / 其他)
- Node.js (Express / NestJS / 原生 / 其他)
- Python (Django / Flask / FastAPI / 其他)
- 其他
-
環境狀態:是否已有藍新金流商店帳號?
- 是,已有測試環境帳號
- 是,已有正式環境帳號
- 否,需要申請
Ask the user the following questions:
-
Project Framework: Which framework are you using?
- PHP (Laravel / Native PHP / Others)
- Node.js (Express / NestJS / Native / Others)
- Python (Django / Flask / FastAPI / Others)
- Others
-
Environment Status: Do you already have a NewebPay merchant account?
- Yes, already have a test environment account
- Yes, already have a production environment account
- No, need to apply
環境變數設定
Environment Variable Setup
引導用戶建立環境變數:
bash
NEWEBPAY_MERCHANT_ID=MS12345678
NEWEBPAY_HASH_KEY=your_hash_key
NEWEBPAY_HASH_IV=your_hash_iv
NEWEBPAY_ENV=test # test 或 production指導用戶:
- 在專案根目錄建立或編輯 檔案
.env - 加入上述環境變數
- 確保 已加入
.env.gitignore
Guide users to set up environment variables:
bash
NEWEBPAY_MERCHANT_ID=MS12345678
NEWEBPAY_HASH_KEY=your_hash_key
NEWEBPAY_HASH_IV=your_hash_iv
NEWEBPAY_ENV=test # test or productionGuidance for users:
- Create or edit the file in the project root directory
.env - Add the above environment variables
- Ensure is added to
.env.gitignore
下一步
Next Steps
完成環境設定後,根據用戶需求引導:
| 需求 | Skill | 說明 |
|---|---|---|
| 建立支付頁面 | | MPG 幕前支付串接 |
| 查詢交易狀態 | | 交易查詢 API |
| 處理退款 | | 信用卡/電子錢包退款 |
After completing the environment setup, guide users based on their needs:
| Requirement | Skill | Description |
|---|---|---|
| Create payment page | | MPG front-end payment integration |
| Query transaction status | | Transaction query API |
| Process refunds | | Credit card/e-wallet refund |
環境資訊
Environment Information
| 環境 | API Base URL |
|---|---|
| 測試 | |
| 正式 | |
| Environment | API Base URL |
|---|---|
| Test | |
| Production | |
支援的支付方式
Supported Payment Methods
- 信用卡: 一次付清、分期付款、紅利折抵
- 行動支付: Apple Pay、Google Pay、Samsung Pay
- 電子錢包: LINE Pay、台灣Pay、TWQR
- ATM: WebATM、ATM轉帳
- 超商: 代碼繳費、條碼繳費
- Credit Card: One-time payment, installment payment, point redemption
- Mobile Payment: Apple Pay, Google Pay, Samsung Pay
- E-Wallet: LINE Pay, Taiwan Pay, TWQR
- ATM: WebATM, ATM transfer
- Convenience Store: Code payment, barcode payment
重要注意事項
Important Notes
- HashKey 和 HashIV 必須保密,不可暴露在前端
- 時間戳記容許誤差 ±120 秒
- 訂單編號不可重複,限 30 字元
- ReturnURL/NotifyURL 只接受 80/443 Port
- HashKey and HashIV must be kept confidential and must not be exposed to the front-end
- Timestamp allows an error of ±120 seconds
- Order numbers cannot be duplicated and are limited to 30 characters
- ReturnURL/NotifyURL only accepts ports 80/443