Legacy jersey webhook handler missing payment_status guard #267

Open
opened 2026-03-31 00:21:49 +00:00 by forgejo_admin · 0 comments
Contributor

Type

Bug

Lineage

Discovered scope from QA review of basketball-api PR #266 (2026-03-30).

Repo

forgejo_admin/basketball-api

What Broke

_handle_jersey_checkout_completed in routes/webhooks.py is a legacy handler that marks players as paid without checking payment_status == "paid" first. PR #266 fixed this in _handle_generic_order_completed but the legacy handler was not updated.

Repro Steps

  1. Stripe fires checkout.session.completed for a legacy jersey checkout
  2. Legacy handler processes event without checking payment_status
  3. Player could be marked as paid before payment actually completes

Expected Behavior

Legacy handler should check payment_status == "paid" before updating player/order records, matching the pattern fixed in PR #266.

Environment

  • Cluster/namespace: prod / basketball-api
  • Service version: latest main (post PR #266)

Acceptance Criteria

  • _handle_jersey_checkout_completed guards on payment_status == "paid"
  • Existing tests updated to cover this path
  • project-westside-basketball
  • story:WS-S18
  • basketball-api PR #266 -- fixed the generic handler but not this legacy one
### Type Bug ### Lineage Discovered scope from QA review of basketball-api PR #266 (2026-03-30). ### Repo `forgejo_admin/basketball-api` ### What Broke `_handle_jersey_checkout_completed` in `routes/webhooks.py` is a legacy handler that marks players as paid without checking `payment_status == "paid"` first. PR #266 fixed this in `_handle_generic_order_completed` but the legacy handler was not updated. ### Repro Steps 1. Stripe fires checkout.session.completed for a legacy jersey checkout 2. Legacy handler processes event without checking payment_status 3. Player could be marked as paid before payment actually completes ### Expected Behavior Legacy handler should check `payment_status == "paid"` before updating player/order records, matching the pattern fixed in PR #266. ### Environment - Cluster/namespace: prod / basketball-api - Service version: latest main (post PR #266) ### Acceptance Criteria - [ ] `_handle_jersey_checkout_completed` guards on `payment_status == "paid"` - [ ] Existing tests updated to cover this path ### Related - `project-westside-basketball` - story:WS-S18 - basketball-api PR #266 -- fixed the generic handler but not this legacy one
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/basketball-api#267
No description provided.