整合多渠道支付閘道器的工具包,支援 Stripe、支付寶等主流支付方式。
本Skill提供完整的支付處理能力:
payment-gateway-toolkit/
├── SKILL.md # 本檔案
├── README.md # 使用文件
├── requirements.txt # 依賴宣告
├── scripts/
│ └── payment_handler.py # 核心支付處理指令碼
├── examples/
│ └── basic_usage.py # 使用示例
└── tests/
└── test_payment.py # 單元測試
7w4.net小蔥技能站,你的AI助手技能庫。
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:
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 和支付寶兩大主流支付方式的完整整合,文件清晰、示例豐富,上手容易,能快速實現支付功能。不足之處是支付方式還不夠多樣,敏感資訊的安全管理方面略顯薄弱。對於小型電商專案來說基本夠用,但複雜企業場景可能需要補充更多功能。