What I built
Reproduced the race where concurrent requests created a booking twice or approved a payment twice, found the cause and blocked it in layers. Also moved the payment path to a new payment gateway when the old contract ended.
Key work
- Duplicate bookings
- reproduced concurrent requests creating the same booking twice, blocked with MySQL locks and unique constraints
- Duplicate approvals
- per-booking idempotency keys, a lock around approval, automatic cancel on duplicate approval
- Double confirmation
- two-way check so domestic and global bookings cannot confirm the same slot
- Abandonment
- no pending booking left behind when a user leaves during payment auth
- Gateway migration
- card type and cutover branching, re-registration push for existing easy-pay users, new payments blocked on the old gateway (refunds and settlement kept), production merchant cutover