-
Notifications
You must be signed in to change notification settings - Fork 11.1k
新增Jeepay支付接入 #4098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
新增Jeepay支付接入 #4098
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
dc0fa5e
feat(payment): add Jeepay top-up integration
Calcium-Ion 58ccff8
fix(payment): support jeepay notify form payloads
Calcium-Ion ce0f916
feat(payment): support jeepay qr payment modes
Calcium-Ion 39e44d2
chore(ui): refine jeepay payment settings copy
Calcium-Ion e5c16fc
chore(ui): refine jeepay links copy
Calcium-Ion 51daf44
chore(ui): update jeepay settings description
Calcium-Ion 7e13d10
fix(ui): avoid clearing jeepay api key on empty save
Calcium-Ion 5520c11
feat(ui): improve jeepay qr payment modal
Calcium-Ion cdca4b9
feat(payment): poll jeepay qr order status
Calcium-Ion 36cca76
feat(payment): add jeepay order timeout settings
Calcium-Ion 86a01c0
chore(ui): remove jeepay notify and return url fields
Calcium-Ion 059dbd5
chore(payment): improve jeepay error logging
Calcium-Ion 7d50d42
fix(payment): send jeepay expired time in seconds
Calcium-Ion 3949fb2
chore(ui): update jeepay icon
Calcium-Ion db8bc8c
chore(ui): refine jeepay qr modal layout
Calcium-Ion 1df0f87
chore(ui): set default jeepay base url
Calcium-Ion 286a42d
feat(ui): handle expired jeepay qr state
Calcium-Ion 8d52408
chore(ui): move jeepay settings after waffo
Calcium-Ion 71a24ed
chore(ui): update jeepay icon in confirm modal
Calcium-Ion 166b95a
chore(ui): update jeepay registration links
Calcium-Ion 55de524
fix(ui): refine jeepay copy and expiry countdown
Calcium-Ion 4267c8f
fix(ui): prevent jeepay countdown from restarting
Calcium-Ion 75032c4
fix(payment): tighten jeepay callback and expiry handling
Calcium-Ion b0e43e3
Merge pull request #1 from jeequan/feature/jeepay-topup-integration
jeequan bd222d4
Merge branch 'QuantumNous:main' into main
jeequan 90fcc13
Merge branch 'QuantumNous:main' into main
jeequan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expose the effective Jeepay limits here, not the raw option values.
Line 95 and Lines 106-117 return
setting.JeepayMinTopUp/setting.JeepayOrderTimeoutMinutesdirectly, but the Jeepay flow already normalizes non-positive values viagetJeepayMinTopUp()andgetJeepayOrderTimeoutMinutes()incontroller/topup_jeepay.go:66-80. When those stored values are unset or malformed, the UI will enable low amounts or show a zero-minute expiry while the backend enforces different limits.💡 Proposed fix
if enableJeepay { hasJeepay := false for _, method := range payMethods { if method["type"] == PaymentMethodJeepay { @@ if !hasJeepay { payMethods = append(payMethods, map[string]string{ "name": "Jeepay", "type": PaymentMethodJeepay, "color": "rgba(var(--semi-green-5), 1)", - "min_topup": strconv.Itoa(setting.JeepayMinTopUp), + "min_topup": strconv.FormatInt(getJeepayMinTopUp(), 10), }) } } @@ - "enable_jeepay_topup": enableJeepay, - "jeepay_way_code": getJeepayWayCode(), - "jeepay_order_timeout_minutes": setting.JeepayOrderTimeoutMinutes, + "enable_jeepay_topup": enableJeepay, + "jeepay_way_code": getJeepayWayCode(), + "jeepay_order_timeout_minutes": getJeepayOrderTimeoutMinutes(), @@ - "jeepay_min_topup": setting.JeepayMinTopUp, + "jeepay_min_topup": getJeepayMinTopUp(),Also applies to: 104-117
🤖 Prompt for AI Agents