Skip to content

fix(payment): hide classic Waffo Pancake settings - #5085

Merged
seefs001 merged 1 commit into
QuantumNous:mainfrom
seefs001:fix/disable-classic-waffo-pancake
May 24, 2026
Merged

fix(payment): hide classic Waffo Pancake settings#5085
seefs001 merged 1 commit into
QuantumNous:mainfrom
seefs001:fix/disable-classic-waffo-pancake

Conversation

@seefs001

@seefs001 seefs001 commented May 24, 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 processing with mandatory validation for merchant identifiers during session creation, preventing orders with incomplete information from being processed and improving data integrity.
  • UI Changes

    • Removed Waffo Pancake payment configuration settings from the payment method management interface, streamlining the payment configuration experience and simplifying available options.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 24, 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: 2bf54cf7-0394-489f-b6be-d6cc2a0d7a99

📥 Commits

Reviewing files that changed from the base of the PR and between 0354c38 and dc9fbbd.

📒 Files selected for processing (3)
  • service/waffo_pancake.go
  • service/waffo_pancake_test.go
  • web/classic/src/components/settings/PaymentSetting.jsx

Walkthrough

The PR enforces OrderMerchantExternalID as a required field in the backend's Waffo Pancake checkout session creation and removes all WaffoPancake configuration UI and state from the frontend payment settings component.

Changes

Waffo Pancake validation and configuration removal

Layer / File(s) Summary
Backend OrderMerchantExternalID validation
service/waffo_pancake.go, service/waffo_pancake_test.go
CreateWaffoPancakeCheckoutSession adds validation that OrderMerchantExternalID must be non-empty after trimming, returning an error if blank. A new test asserts this validation, and existing test struct formatting is updated.
Frontend Waffo Pancake configuration removal
web/classic/src/components/settings/PaymentSetting.jsx
The inputs initial state, getOptions switch cases, and the UI Tabs.TabPane for Waffo Pancake settings are all removed, leaving only the standard Waffo settings tab.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • QuantumNous/new-api#5047: Both PRs involve OrderMerchantExternalID in the Waffo Pancake checkout flow—[BugFix] fix webhook process #5047 sends/uses it for session creation and webhook resolution, while this PR adds strict validation that it must be non-empty.
  • QuantumNous/new-api#5038: Both PRs remove Waffo Pancake gateway configuration wiring from PaymentSetting.jsx, including option parsing and UI tabs.
  • QuantumNous/new-api#4935: Both PRs modify the Waffo Pancake checkout-session creation path in service/waffo_pancake.go as part of the broader checkout session integration.

Poem

🥞 The pancake takes shape, but now it demands,
A merchant ID strong—no blanks will pass through,
The frontend trimmed clean of old Waffo commands,
Validation stands tall where confusion once flew.
One golden layer of control, tried and true. 🐰

✨ 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 49bc3a1 into QuantumNous:main May 24, 2026
1 of 2 checks passed
xyfacai pushed a commit to xyfacai/new-api that referenced this pull request May 30, 2026
SamuelSxy pushed a commit to SamuelSxy/new-api-rh that referenced this pull request Jun 7, 2026
fx247562340 pushed a commit to fx247562340/vancine-platform that referenced this pull request Jun 11, 2026
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
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