feat(waffo): Waffo payment gateway integration with configurable methods and refund - #3138
Closed
zhongyuanzhao-alt wants to merge 5425 commits into
Closed
feat(waffo): Waffo payment gateway integration with configurable methods and refund#3138zhongyuanzhao-alt wants to merge 5425 commits into
zhongyuanzhao-alt wants to merge 5425 commits into
Conversation
feat(oauth): implement custom OAuth provider
fix: Claude stream block index/type transitions
fix: add paragraph breaks between reasoning summary chunks
# Conflicts: # service/openaicompat/chat_to_responses.go
…t-stream feat: channel test with stream=true
…fo-input-token fix: 使用openai兼容接口调用部分渠道在最终端点为claude原生端点下还是走了openai扣减input_token的逻辑
fix: 补全 streaming message_delta 事件缺失的 input_tokens 和 cache 相关字段
…sponses feat: /v1/messages -> /v1/responses
…ion-configurable feat: make 5m cache-creation ratio configurable
fix: 如果模型管理有自定义配置则不合并默认配置
fix: 修复模型管理"参与官方同步"与"状态"开关无法保存的问题
…inity-tips optimize: channel affinity tips
Replace icon-based language options with plain text labels in both the header dropdown and preferences settings to keep the UI clean and avoid potential controversies. Remove unused country-flag-icons dependency.
Bumps [axios](https://github.com/axios/axios) from 1.12.0 to 1.13.5. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.12.0...v1.13.5) --- updated-dependencies: - dependency-name: axios dependency-version: 1.13.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
…nd_yarn/web/axios-1.13.5 chore(deps): bump axios from 1.12.0 to 1.13.5 in /web
* feat(localization): added zh_TW * fixed based on @coderabbitai * updated false translation for zh_TW * new workflow * revert * fixed a lot of translations * turned most zh to zh-CN * fallbacklang * bruh * eliminate ALL _ * fix: paths and other miscs thanks @Calcium-Ion * fixed translation and temp fix for preferencessettings.js * fixed translation error * fixed issue about legacy support * reverted stupid coderabbit's suggestion
* feat: logs cache field * feat: logs cache field * feat: logs cache field
# Conflicts: # README.fr.md # README.ja.md # README.md # README.zh_CN.md
…4f8a4248b0ab3b03ba703796ea3 fix: kling risk fail return openAIVideo error
fix: add explicit docker-compose networks
…ride-beta-header-append feat:support $keep_only_declared and deduped $append for header override
The previous merge lost subscription state, API calls, and RechargeCard props that were added to main after our branch diverged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add default payment method icons (Card/Apple Pay/Google Pay) as static assets in web/public/ and reference by path in DefaultWaffoPayMethods - Make refund reason a required field with validation - Add maxLength=64 to Pay Method Type and Pay Method Name inputs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove all Waffo payment refund code including: - Backend: Refund model, controller endpoints, webhook handler, router routes, status constants - Frontend: RefundModal component, refund button in TopupHistoryModal - i18n: refund translation keys across all 6 locale files Task billing RefundTaskQuota (async task quota refund) is preserved as it's unrelated to Waffo. Backup branch: ft-waffo-payment-zzy20260209-backup-with-refund Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This field was only used by the now-removed refund functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chore: update model lists for frequently used channels
…error
Waffo API validates userInfo.userEmail max length is 64. Some users have
emails exceeding this limit, causing A0003 validation failure. Use a
fixed format {userId}@examples.com (max 32 chars) for all users.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion links and submission checks
Round remaining balance
enhance channel key viewing
…ations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrate Waffo payment gateway as a new payment provider for quota top-up, with full admin configuration UI, configurable payment methods, and refund support.
Backend
controller/topup_waffo.go— order creation via Waffo SDK, webhook handler (payment + refund notifications), RSA signature verificationmodel/refund.go— admin-initiated refund with configurable quota deduction, webhook-driven status updatessetting/payment_waffo.go+model/option.go— runtime-configurable Waffo credentials, sandbox/production mode, currency, payment methodscontroller/topup_waffo_test.go— 651 lines covering webhook signature verification, payment/refund event handling, edge casesFrontend
Cleanup
Key Design Decisions
paymentRequestId = merchantOrderIdfor simplified order tracking across logs, DB, and Waffo dashboardoptionstable as JSON), not hardcodedTest Plan
go test ./controller/ -run TestWaffo -v(webhook signature, payment events, refund events)Summary by CodeRabbit
New Features
Chores