erio
d952942627
feat: 订单来源追踪,保存 src_host / src_url 到订单记录
...
iframe 嵌入充值页面时 URL 自动附带来源参数,写入数据库用于追踪分析。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 20:40:16 +08:00
erio
b4eebb0b1b
feat: 分页组件统一封装 + 移动端无限滚动
...
- 新增 PaginationBar 组件,支持 isDark / loading / 页码导航 / 每页大小切换
- 重写 pay/orders/page.tsx 使用 PaginationBar,summary 来自 API groupBy 全量统计
- admin/page.tsx 替换内联分页 UI 为 PaginationBar
- MobileOrderList 支持无限滚动:IntersectionObserver 哨兵 + hasMore/loadingMore props
- pay/page.tsx 新增 loadMoreOrders(append 模式),初始化/刷新时重置分页状态
2026-03-01 20:12:32 +08:00
erio
292c14b882
feat: 订单列表支持分页查询,分页大小可选 20/50/100
...
- /api/orders/my 新增 page/page_size 参数,返回分页信息和全局状态统计
- 用户订单页:分页控件(首/上/下/末页)+ 分页大小选择,摘要卡片改为全局统计
- 管理员订单页:分页大小选择器(20/50/100)+ 首尾页跳转按钮
2026-03-01 20:04:49 +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
ceb09659f8
feat: add refresh button to orders panel and admin page
...
- Desktop orders card in pay/page.tsx: refresh button next to "订单中心"
- Admin orders page: refresh button next to the page title
2026-03-01 14:17:18 +08:00
erio
d5719bf213
feat: migrate payment provider to easy-pay, add order history and refund support
...
- Replace zpay with easy-pay payment provider (new lib/easy-pay/ module)
- Add order history page for users (pay/orders)
- Add GET /api/orders/my endpoint to list user's own orders
- Add GET /api/users/[id] endpoint for sub2api user lookup
- Add order status tracking module (lib/order/status.ts)
- Update config to support easy-pay credentials (merchant ID, key, gateway)
- Update PaymentForm and PaymentQRCode components for easy-pay flow
- Update pay page and admin page with new order management UI
- Update order service to support easy-pay, cancellation, and refund
2026-03-01 03:04:24 +08:00