Skip to content
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

server/transaction: fix payout not working if refunded payments appear at the end #4807

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

frankie567
Copy link
Member

If a refunded payment appear last, or if it's big enough, we can't compensate its outstanding amount with subsequent transfers, leaving us with an outstanding amount.

To solve that, we simply sort the transactions by their transferrable amount, so the negative one appear first and can be compensated by the positive ones appearing after.

…r at the end

If a refunded payment appear last, or if it's big enough, we can't compensate its outstanding amount with subsequent transfers, leaving us with an outstanding amount.

To solve that, we simply sort the transactions by their transferrable amount, so the negative one appear first and can be compensated by the positive ones appearing after.
@frankie567 frankie567 enabled auto-merge (rebase) January 8, 2025 13:24
Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
polar ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 1:25pm
polar-sandbox ⬜️ Ignored (Inspect) Visit Preview Jan 8, 2025 1:25pm

Copy link
Contributor

github-actions bot commented Jan 8, 2025

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@frankie567 frankie567 merged commit e07a9e4 into main Jan 8, 2025
11 checks passed
@frankie567 frankie567 deleted the fix/stripe-payout-refunds branch January 8, 2025 13:27
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