newebpay
Original:🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected
Provides an overview of NewebPay integration and guides users to the appropriate skill. Use this when starting NewebPay integration, setting up the environment, or needing general guidance about NewebPay.
1installs
Sourcepaid-tw/skills
Added on
NPX Install
npx skill4agent add paid-tw/skills newebpayTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →NewebPay Integration Guide
Your task is to help users set up the NewebPay environment and guide them to the appropriate integration features.
User Requirement Analysis
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
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
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
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
| Environment | API Base URL |
|---|---|
| Test | |
| Production | |
Supported Payment Methods
- 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 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