erio
|
f53aa9e14c
|
feat: 支持官方支付宝与易支付支付宝同时展示
- PaymentType 改为 string 类型,支持复合 key(如 alipay_direct)
- 官方支付宝注册为 alipay_direct,易支付保持 alipay/wxpay
- 前端按 PAYMENT_TYPE_META 展示标签区分(官方直连/易支付)
- 管理后台显示统一改为 getPaymentTypeLabel 通用映射
- 修复 admin/OrderTable 中 wechat 拼写错误
|
2026-03-06 15:33:22 +08:00 |
|
erio
|
448d36fe2b
|
feat: 移动端 H5 支付跳转 + 改进移动端检测
- PaymentQRCode: 移动端有 payUrl 时直接跳转支付,iframe 中新窗口打开
- detectDeviceIsMobile: 优先使用 navigator.userAgentData.mobile API
|
2026-03-05 16:21:12 +08:00 |
|
erio
|
0c2476f340
|
fix: 无 token 不显示余额;充值完成后立即预取最新余额
- UserInfo.balance 改为可选字段
- 无 token 时不设 balance,PaymentForm 不渲染余额行
- COMPLETED 触发时立即调 loadUserAndOrders 刷新余额
2.2s 结果页展示期间余额已在后台拉取,回表单时即刻呈现新值
|
2026-03-01 21:24:11 +08:00 |
|
erio
|
d9ab65ecf2
|
feat: integrate Stripe payment with bugfixes and active timeout cancellation
- Add Stripe payment provider with Checkout Session flow
- Payment provider abstraction layer (EasyPay + Stripe unified interface)
- Stripe webhook with proper raw body handling and signature verification
- Frontend: Stripe button with URL validation, anti-duplicate click, noopener
- Active timeout cancellation: query platform before expiring, recover paid orders
- Singleton Stripe client, idempotency keys, Math.round for amounts
- Handle async_payment events, return null for unknown webhook events
- Set Checkout Session expires_at aligned with order timeout
- Add cancelPayment to provider interface (Stripe: sessions.expire, EasyPay: no-op)
- Enable stripe in frontend payment type list
|
2026-03-01 17:58:08 +08:00 |
|
erio
|
2f45044073
|
refactor: extract pay page components and migrate zpay → easypay
Components:
- Add PayPageLayout, OrderFilterBar, MobileOrderList, OrderTable, OrderSummaryCards
- Extract shared pay-utils (types, constants, helper functions)
- Simplify pay/page.tsx and orders/page.tsx
EasyPay migration:
- Remove src/lib/zpay/, api/zpay/notify, zpay test, zpay.md
- Simplify config.ts: single envSchema, no ZPAY_* fallback
- Rename DB field zpay_trade_no → payment_trade_no (migration added)
- Update OrderDetail label: ZPAY订单号 → 支付单号
- Update CLAUDE.md project structure
|
2026-03-01 15:55:43 +08:00 |
|