Manuel ticket generation, seat management by route added

This commit is contained in:
Stephanos A
2026-07-07 22:58:01 +03:00
parent d32392b66a
commit 8cc2d9445d
8 changed files with 335 additions and 62 deletions

View File

@@ -33,6 +33,7 @@ import {
PaymentMethodTypeEnum,
PaymentPlatformDto,
BookingAmountResponseDto,
ForceConfirmDto,
} from "./payments.dto";
import { PassengerStaff } from "../../common/passenger-guards";
import { PASSENGER_PERMS } from "../../seed/passenger-permissions.registry";
@@ -124,6 +125,19 @@ export class PaymentsController {
return this.service.refund(dto);
}
@Post(":bookingId/force-confirm")
@PassengerStaff([PASSENGER_PERMS.payments.manageMethods, PASSENGER_PERMS.admin])
@ApiBearerAuth("IAM-auth")
@ApiOperation({
summary: "Force-confirm payment & generate ticket (back-office only)",
description:
"Marks the payment as SUCCEEDED, confirms the booking, and generates the ticket. " +
"Use when a vendor payment completed but the webhook was never delivered. Idempotent.",
})
forceConfirm(@Param("bookingId") bookingId: string, @Body() dto: ForceConfirmDto) {
return this.service.forceConfirmPayment(bookingId, dto);
}
@Post("methods")
@PassengerStaff([PASSENGER_PERMS.payments.manageMethods, PASSENGER_PERMS.admin])
@ApiBearerAuth("IAM-auth")