Skip to content

Add a task for refunding/partrefunding keebspansions - #2377

Merged
russss merged 5 commits into
mainfrom
keebspansion-refunds
Aug 11, 2026
Merged

Add a task for refunding/partrefunding keebspansions#2377
russss merged 5 commits into
mainfrom
keebspansion-refunds

Conversation

@lukegb

@lukegb lukegb commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This ended up a bit more complicated to deal with edgecases that I'm not convinced exist in practice but may be useful to handle in future years:

  • Payments for a single, 'part-collected' keebspansion -> payment marked part-refunded, purchase changes price/price tier/product
  • Payments for a single, uncollected keebspansion -> payment marked refunded, purchase marked refunded
  • Payments that include those things but also other stuff -> payment marked part-refunded, purchase handled as above
  • Payments that include a combination of part-collected and uncollected keebspansions -> payment marked part-refunded, purchases handled as above
  • Users with keebspansion payments in multiple currencies, with some combination of the above -> does mostly the right thing as above

@lukegb

lukegb commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

I haven't actually tested this at all, so other than sprinkling assert everywhere to make mypy happy caveat emptor; this of all things I think I should write some actual tests for.

This ended up a bit more complicated to deal with edgecases that I'm not
convinced exist in practice but may be useful to handle in future years:

- Payments for a single, 'part-collected' keebspansion
  -> payment marked part-refunded, purchase changes price/price
     tier/product
- Payments for a single, uncollected keebspansion
  -> payment marked refunded, purchase marked refunded
- Payments that include those things but also other stuff
  -> payment marked part-refunded, purchase handled as above
- Payments that include a combination of part-collected and uncollected
  keebspansions
  -> payment marked part-refunded, purchases handled as above
- Users with keebspansion payments in multiple currencies, with some
  combination of the above
  -> does mostly the right thing as above
@lukegb
lukegb force-pushed the keebspansion-refunds branch 6 times, most recently from d546afc to 7cf9a35 Compare August 8, 2026 21:33
@lukegb
lukegb force-pushed the keebspansion-refunds branch from 7cf9a35 to 1bb99c6 Compare August 8, 2026 21:46
@lukegb
lukegb force-pushed the keebspansion-refunds branch from 915b4cc to 8a8be64 Compare August 8, 2026 21:57
@russss
russss merged commit a17ad9b into main Aug 11, 2026
5 checks passed
@russss
russss deleted the keebspansion-refunds branch August 11, 2026 08:42
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