Skip to content

fix: stripe支付成功未正确跳转 - #1807

Merged
Calcium-Ion merged 1 commit into
mainfrom
fix-stripe-successurl
Sep 15, 2025
Merged

fix: stripe支付成功未正确跳转#1807
Calcium-Ion merged 1 commit into
mainfrom
fix-stripe-successurl

Conversation

@creamlike1024

@creamlike1024 creamlike1024 commented Sep 15, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • After completing a Stripe top-up, you are now redirected to the Console logs page instead of the generic log page.
    • Only the post-payment success redirect was updated; the payment flow, cancellations, and error handling remain unchanged.
    • No changes to public APIs or user-facing settings.

@coderabbitai

coderabbitai Bot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Updated the Stripe Checkout session success redirect path in genStripeLink from "/log" to "/console/log" in controller/topup_stripe.go. No other logic, fields, or public interfaces were changed.

Changes

Cohort / File(s) Summary of Changes
Stripe checkout redirect
controller/topup_stripe.go
Changed SuccessURL from ServerAddress + "/log" to ServerAddress + "/console/log"; other CheckoutSessionParams unchanged.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant S as Server (genStripeLink)
    participant P as Stripe Checkout

    U->>S: Request top-up link
    S->>P: Create Checkout Session (SuccessURL=/console/log)
    P-->>S: Session URL
    S-->>U: Return session link
    U->>P: Complete payment
    P-->>U: Redirect to {ServerAddress}/console/log
    note over U,S: Only the success redirect path changed
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I tweaked a trail from log to console’s glow,
A hop to where the status pages flow.
One tiny nibble of URL delight,
The checkout bun now lands just right.
Thump-thump! Redirects aligned—let’s go! 🥕

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-stripe-successurl

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f760a8 and f236785.

📒 Files selected for processing (1)
  • controller/topup_stripe.go (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@Calcium-Ion
Calcium-Ion merged commit 8e95d33 into main Sep 15, 2025
1 check was pending
@Calcium-Ion
Calcium-Ion deleted the fix-stripe-successurl branch October 11, 2025 03:06
@coderabbitai coderabbitai Bot mentioned this pull request Oct 30, 2025
x22x22 pushed a commit to x22x22/new-api that referenced this pull request Apr 24, 2026
…ssurl

fix: stripe支付成功未正确跳转
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.

2 participants