Repository navigation
feat(payment): 支持为 Epay 支付宝和微信分别配置渠道 ID - #8519
consider908 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. WalkthroughThe Epay settings now support separate Alipay and WeChat Pay channel IDs. Top-up and subscription order creation add the configured ID for the selected payment method before signing the order. ChangesEpay channel IDs
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant RequestEpay
participant SubscriptionRequestEpay
participant newEpayOrder
participant EpayChannelID
participant EpayGateway
RequestEpay->>newEpayOrder: Create top-up order
SubscriptionRequestEpay->>newEpayOrder: Create subscription order
newEpayOrder->>EpayChannelID: Read selected payment method channel ID
EpayChannelID-->>newEpayOrder: Return trimmed ID or empty value
newEpayOrder->>EpayGateway: Submit signed order through selected purchase path
Possibly related PRs
Suggested reviewers: Merge Risk:
|
Agent: Codex 0.171.0-alpha.13.2 · model ID unknown · Codex Desktop (Windows) · 2026-12-01 UTC
Closes #8518
Request summary
在 Epay 网关里分别配置支付宝和微信渠道 ID。两项均可留空。下单时仅在所选方式配置了渠道 ID 时发送
cid。Summary
钱包充值和订阅购买共用
newEpayOrder,在 MD5 或 RSA 签名前确定下单参数。本次代码由 AI 辅助编写。Evidence
04dfcbb71,充值和订阅均调用client.Purchase,其下单表单没有cid。go test ./controller -run 'Epay|PaymentWebhook' -count=1。配置0012后,订单保留前导零,签名可验证。渠道 ID 为空或只含空格时,MD5 表单和签名与原 SDK 输出一致。bun run test src/features/system-settings/integrations/__tests__/epay-sign-settings.test.tsx的 4 项用例通过,覆盖保存支付宝渠道 ID 和清空微信渠道 ID。bun run typecheck和bun run build通过。go test ./controller ./setting/operation_setting -count=1时,部分认证和审计用例在清理仍被占用的临时audit.db时失败。提交时沿用上述结果。Merge Danger
Door: Two-way。清空渠道 ID 即可恢复原下单参数,无需数据库迁移。
Blast Radius: 支付。涉及 Epay 钱包充值、订阅下单和管理端配置页。
Summary by CodeRabbit