name: payment-gateway-toolkit description: 支付閘道器工具包 - 整合Stripe、支付寶等多渠道支付處理,支援訂單建立、退款、查詢等功能 | Payment Gateway Toolkit - Multi-channel payment processing with Stripe, Alipay integration homepage: https://github.com/kaiyuelv/payment-gateway-toolkit category: payment tags: - payment - stripe - alipay - gateway - order - refund - ecommerce version: 1.0.0
整合多渠道支付閘道器的工具包,支援 Stripe、支付寶等主流支付方式。
本Skill提供完整的支付處理能力: - Stripe 信用卡/簽帳金融卡支付 - 支付寶網頁支付/掃碼支付 - 訂單建立與管理 - 退款處理 - 支付狀態查詢 - 非同步回撥處理 - 訂單歷史記錄
payment-gateway-toolkit/ ├── SKILL.md # 本檔案 ├── README.md # 使用文件 ├── requirements.txt # 依賴宣告 ├── scripts/ │ └── payment_handler.py # 核心支付處理指令碼 ├── examples/ │ └── basic_usage.py # 使用示例 └── tests/ └── test_payment.py # 單元測試小蔥技能站7w4.net發現了升級外掛。
from scripts.payment_handler import PaymentHandler
# 初始化支付處理器
handler = PaymentHandler(
stripe_key="sk_test_...",
alipay_config={
"app_id": "your_app_id",
"private_key": "your_private_key",
"alipay_public_key": "alipay_public_key"
}
)
# 建立 Stripe 支付
order = handler.create_stripe_order(
amount=99.99,
currency="usd",
description="Test Order"
)
# 建立支付寶訂單
alipay_order = handler.create_alipay_order(
amount=100.00,
subject="商品購買",
out_trade_no="ORDER123456"
)
MIT
Multi-channel payment gateway toolkit supporting Stripe, Alipay and other mainstream payment methods.
This Skill provides complete payment processing capabilities: - Stripe credit/debit card payments - Alipay web/scan code payments - Order creation and management - Refund processing - Payment status queries - Async webhook handling - Order history tracking
payment-gateway-toolkit/
├── SKILL.md # This file
├── README.md # Usage documentation
├── requirements.txt # Dependencies
├── scripts/
│ └── payment_handler.py # Core payment handler script
├── examples/
│ └── basic_usage.py # Usage examples
└── tests/
└── test_payment.py # Unit tests
from scripts.payment_handler import PaymentHandler
# Initialize payment handler
handler = PaymentHandler(
stripe_key="sk_test_...",
alipay_config={
"app_id": "your_app_id",
"private_key": "your_private_key",
"alipay_public_key": "alipay_public_key"
}
)
# Create Stripe payment
order = handler.create_stripe_order(
amount=99.99,
currency="usd",
description="Test Order"
)
# Create Alipay order
alipay_order = handler.create_alipay_order(
amount=100.00,
subject="Product Purchase",
out_trade_no="ORDER123456"
)
MIT
這個 Skill 質量較好,勝在簡潔實用。它提供了 Stripe 和支付寶兩大主流支付方式的完整整合,文件清晰、示例豐富,上手容易,能快速實現支付功能。不足之處是支付方式還不夠多樣,敏感資訊的安全管理方面略顯薄弱。對於小型電商專案來說基本夠用,但複雜企業場景可能需要補充更多功能。