From 67017409d7e10432170515d56cf9f62885742948 Mon Sep 17 00:00:00 2001 From: Kydoimos Date: Thu, 17 Sep 2026 15:42:38 -0300 Subject: [PATCH] Drop stale comment about not applying credit at booking This change applies credit at booking for scheduled rebooks, so the note saying the pay-now flow deliberately does not was contradictory. Co-authored-by: anthropic/claude-opus-4-8 --- src/Booking/LessonBooker.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Booking/LessonBooker.php b/src/Booking/LessonBooker.php index 95e1148..8a416fe 100644 --- a/src/Booking/LessonBooker.php +++ b/src/Booking/LessonBooker.php @@ -198,13 +198,11 @@ class LessonBooker { // A scheduled lesson charged at booking — the extra lesson added to (or a // cancelled one rebooked within) an already-billed month — skips the daily - // scan, which is the only place credit is otherwise applied. Apply the - // payer's account credit here too, so a cancellation credit settles the - // rebooking instead of the family being charged twice for the same slot. A - // pending payment fully covered by credit is settled and its lesson - // confirmed; applyCredits is a no-op when the payer holds no balance. The - // one-time pay-now flow is left alone: its payment step already fronts the - // student, and credit there is a manual studio decision. + // scan, so apply the payer's account credit here too. A cancellation credit + // then settles the rebooking instead of the family being charged twice for + // the same slot. A pending payment fully covered by credit is settled and + // its lesson confirmed; applyCredits is a no-op when the payer holds no + // balance. if ( $offering->isScheduledBilling() && null !== $payment && null !== $payment->id && Payment::STATUS_PENDING === $payment->status ) { $this->payments->applyCredits( $payerId, [ $payment ] ); $payment = $this->payments->findPayment( (int) $payment->id ) ?? $payment;