add notes/remark and refactor round-trip
PHP Tests / php-tests (push) Has been cancelled

This commit is contained in:
Nyan Lin Paing
2026-08-22 21:43:41 +07:00
parent 894352b43f
commit fa908cdcaf
46 changed files with 1679 additions and 182 deletions
@@ -16,6 +16,18 @@ class PaymentInitiationNotAllowedException extends RuntimeException
);
}
/**
* A round trip's payment is combined on the outbound leg the return
* leg is marked paid when the outbound leg's payment succeeds
* (MarkBookingPaid), never via its own Payment (domain.md §2b).
*/
public static function isReturnLeg(Booking $booking): self
{
return new self(
"Booking [{$booking->booking_ref}] is a round trip's return leg — initiate payment on its linked outbound booking instead."
);
}
public function render(Request $request): ?JsonResponse
{
if ($request->expectsJson()) {