Skip to content

fix: enforce Waffo subscription compliance and product ID update - #5038

Merged
seefs001 merged 2 commits into
QuantumNous:mainfrom
seefs001:fix/waffo-pancake
May 22, 2026
Merged

fix: enforce Waffo subscription compliance and product ID update#5038
seefs001 merged 2 commits into
QuantumNous:mainfrom
seefs001:fix/waffo-pancake

Conversation

@seefs001

@seefs001 seefs001 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • Closes # (如有)

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 IssuesPRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit

  • Improvements

    • Enhanced payment compliance validation in the subscription checkout flow to ensure all requirements are met before processing
    • Improved subscription plan data persistence to ensure complete information retention during updates
  • UI/UX Changes

    • Updated payment settings interface with refined gateway configuration options

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef2a5e64-0a2b-486a-9c77-d55305947122

📥 Commits

Reviewing files that changed from the base of the PR and between 19f1821 and 2039af1.

📒 Files selected for processing (3)
  • controller/subscription.go
  • controller/subscription_payment_waffo_pancake.go
  • web/classic/src/components/settings/PaymentSetting.jsx

Walkthrough

This PR migrates the payment gateway integration from Waffo Pancake to Waffo across backend and frontend. Backend subscription payment handling adds an early compliance check, and subscription plan updates persist the waffo pancake product ID. Frontend payment settings UI replaces the Waffo Pancake gateway component with a Waffo gateway component.

Changes

Waffo Gateway Migration

Layer / File(s) Summary
Backend payment validation and subscription persistence
controller/subscription_payment_waffo_pancake.go, controller/subscription.go
Early compliance check prevents request processing if payment requirements are not met, and subscription plan updates now persist the waffo_pancake_product_id field.
Frontend payment gateway settings UI migration
web/classic/src/components/settings/PaymentSetting.jsx
Waffo Pancake gateway import and tab rendering are removed and replaced with Waffo gateway component for the settings UI.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 From Pancake to Waffo, we hop and we slide,
Compliance checks guard the payment gateway wide,
Frontend tabs flutter with elegant grace,
A migration most seamless, in just the right place! 🥞✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@seefs001
seefs001 merged commit f2c7647 into QuantumNous:main May 22, 2026
1 of 2 checks passed
yiranxiaohui added a commit to yiranxiaohui/new-api that referenced this pull request May 25, 2026
Range: 18282e6..3b9ed0a8 (upstream/main as of fetch)

Highlights:
- feat: support request_header key source (QuantumNous#4903)
- feat: Waffo Pancake gateway + admin catalog binding (QuantumNous#4935)
- perf: optimize request metadata extraction, drop dead batch
  helpers in relay/channel/openai/helper.go (QuantumNous#5009)
- perf: reduce heap residency for large base64 relay requests
- fix(channel): evict auto-disabled multi-key channels from cache (QuantumNous#4983)
- fix: resolve model owned_by from active channels (QuantumNous#4416) — introduces
  channelOwnerName/getPreferredModelOwners/buildOpenAIModel + ListModels refactor
- fix: GetAllChannels respects group filter (QuantumNous#4847, QuantumNous#4885)
- fix(auth): expose register_enabled, aff_code, localize reset (QuantumNous#4871, QuantumNous#4945, QuantumNous#4769)
- fix(webhook): processing + Waffo subscription compliance (QuantumNous#5047, QuantumNous#5038)
- refactor(ui): system settings drill-in sidebar + log filter responsiveness

Conflicts resolved:
- controller/model.go: kept local hiddenMappedModels filter
  (resolveAccessibleModelGroups + getHiddenMappedModelNamesForGroups)
  on top of upstream's ListModels refactor; adopted upstream
  channelOwnerName helper.
- relay/channel/openai/helper.go: adopted upstream (HEAD's
  processChatCompletions/processCompletions were dead code after
  upstream's perf refactor in QuantumNous#5009).

Local patches verified intact: Username + fillTopUpUsernames (model/topup.go,
locked by topup_username_test.go), HideUpstreamErrors, Claude developer-role
normalization, Gemini role fallback, Model Chat header nav entry,
channel affinity auto-clear.

Note: go build not run (no Go toolchain in this environment); CI to verify.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
xyfacai pushed a commit to xyfacai/new-api that referenced this pull request May 30, 2026
…ntumNous#5038)

* fix: enforce Waffo subscription compliance and product ID updates

* fix: hide Waffo Pancake settings in classic UI
SamuelSxy pushed a commit to SamuelSxy/new-api-rh that referenced this pull request Jun 7, 2026
…ntumNous#5038)

* fix: enforce Waffo subscription compliance and product ID updates

* fix: hide Waffo Pancake settings in classic UI
fx247562340 pushed a commit to fx247562340/vancine-platform that referenced this pull request Jun 11, 2026
…ntumNous#5038)

* fix: enforce Waffo subscription compliance and product ID updates

* fix: hide Waffo Pancake settings in classic UI
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…ntumNous#5038)

* fix: enforce Waffo subscription compliance and product ID updates

* fix: hide Waffo Pancake settings in classic UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant