This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user