mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 16:28:12 +00:00
fix: ( excess-baggage ) pay in the selected method's currency and record settlement
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
UseGuards,
|
||||
} from "@nestjs/common";
|
||||
import { ApiOperation, ApiTags } from "@nestjs/swagger";
|
||||
import { PaymentReferenceType } from "@edr/types";
|
||||
import { ServiceAuthGuard } from "../../common/guards/service-auth.guard";
|
||||
import {
|
||||
PaymentEventDto,
|
||||
@@ -51,6 +52,12 @@ export class InternalPaymentsController {
|
||||
async billQuery(
|
||||
@Body() request: BillQueryRequestDto,
|
||||
): Promise<BillQueryResponseDto> {
|
||||
// Routed on referenceType: the passenger app issues CBE bills for bookings AND for excess
|
||||
// baggage charges, and they live in different tables. Treating every referenceId as a
|
||||
// bookingId would report a perfectly payable baggage bill as NOT_FOUND to the teller.
|
||||
if (request.referenceType === PaymentReferenceType.EXCESS_BAGGAGE) {
|
||||
return this.paymentsService.billQueryExcessBaggage(request.referenceId);
|
||||
}
|
||||
return this.paymentsService.billQuery(request.referenceId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user