feat(partnerpay): cancel an itinerary and refund the organization (#52, PR B) #159
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!159
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/partner-cancel-52"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#52 PR B: cancel an itinerary and refund the organization
POST /v1/orgs/{id}/itineraries/{itinerary_id}/cancel({version},Idempotency-Key,business_portal.itinerary.make_payment,purchaserate class).Completer.Cancel; paid sales have their tickets cancelled (checkin.CancelSaleTickets, gateless activities) and the payment refunded to the organization wallet (payments.Service.RefundSucceeded, keyrefund:<payment id>; a waived payment is only closed).ticket_used); an expired one 409ticket_expired; wrong state 409not_cancellable; stale version 409.payments_guard()also allowssucceeded -> refund_due;ticket_activities.gate_idbecomes nullable.notify.itinerary_cancelled, queued in the transaction, worker sends).wallet.ErrBusy(retryable 503); the M-Pesa STK job skips a sale no longerprocessing.Coverage:
make covertotal 91.4% (minimum 80%).make lint0 issues.Review: dual pass (Ponytail complexity, then correctness); Pass 1 re-checked after fixes.
Rulings / [verify] for the owner
completed).🤖 Generated with Claude Code