Recurring weekly bookings only charge for the first week and only confirm the first lesson #79

Closed
opened 2026-07-22 12:52:30 +00:00 by thatguygriff · 0 comments
Owner

From the 2026-07-22 user demo.

Booking a weekly recurring lesson only requires payment for the first week.

Current behaviour

  • Booking\BookingEndpoint::book() claims up to 12 weekly occurrences and inserts a lesson series, but then creates the payment with $offering->price once — for a per-lesson-priced offering (billing_mode = one_time) the student pays for a single week while holding the whole term.
  • When the payment settles, Payment\PaymentService::confirmRegistration() confirms only the anchor lesson (registration_id); every other lesson row in the series stays pending forever.

Wanted

  • Weekly booking on a one_time-billed offering charges price × number of occurrences actually claimed (the response/e-transfer/Stripe amounts all follow automatically since they derive from the payment row).
  • A full_term-billed offering keeps charging its price once — that price already covers the term (docs/features/offerings.md).
  • Settling the payment (Stripe webhook, e-transfer confirmation, comp) confirms every lesson in the series, not just the anchor.
  • Unit tests covering the amount calculation and series-wide confirmation.
**From the 2026-07-22 user demo.** Booking a weekly recurring lesson only requires payment for the first week. ## Current behaviour - `Booking\BookingEndpoint::book()` claims up to 12 weekly occurrences and inserts a lesson series, but then creates the payment with `$offering->price` **once** — for a per-lesson-priced offering (`billing_mode = one_time`) the student pays for a single week while holding the whole term. - When the payment settles, `Payment\PaymentService::confirmRegistration()` confirms only the **anchor** lesson (`registration_id`); every other lesson row in the series stays `pending` forever. ## Wanted - Weekly booking on a `one_time`-billed offering charges **price × number of occurrences actually claimed** (the response/e-transfer/Stripe amounts all follow automatically since they derive from the payment row). - A `full_term`-billed offering keeps charging its price once — that price already covers the term (`docs/features/offerings.md`). - Settling the payment (Stripe webhook, e-transfer confirmation, comp) confirms **every lesson in the series**, not just the anchor. - Unit tests covering the amount calculation and series-wide confirmation.
thatguygriff added the bugpayments labels 2026-07-22 12:52:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Unsupervised/unsupervised-scheduler#79