Files
123perfect321 114e9efee4 feat: implement epay gateway integration
Payment flow:
- admin Settings → 支付配置: add epay_pid / epay_key / epay_gateway fields,
  with a "测试网关连通" button that hits the gateway's submit.php
- backend: new utils/epay.ts with MD5 sign/verify (timing-safe) and
  gateway URL builder
- backend: rewrite payment.service to read config from Setting table,
  call fulfillOrderByToken on callback
- backend: new GET/POST /api/payments/notify (plain "success"/"fail")
  and GET /api/payments/return (redirect to /success/:token)
- backend: notify/return routes are unauthenticated
- order.service: extract fulfillOrderByToken(token, tradeNo) helper
  used by both simulatePayment and real callbacks
- frontend Pay.vue: auto-create payment on mount and redirect to gateway;
  polling order status every 4s; keep "模拟支付" for local testing
- admin: display the two callback URLs computed from SITE_URL so the
  operator knows what to fill on the epay dashboard
- .env.example: add SITE_URL documentation

README: add 配置支付(易支付)section.
2026-06-17 15:38:51 +08:00
..