This commit is contained in:
Stephanos A
2026-06-24 14:18:33 +03:00
684 changed files with 45768 additions and 17315 deletions

View File

@@ -17,6 +17,7 @@ import {
ApiOkResponse,
ApiProduces,
} from "@nestjs/swagger";
import { IsPublic } from "@tria-plc/api-common/modules/auth/decorators/public.decorator";
import { SkipThrottle, Throttle } from "@nestjs/throttler";
import { Response } from "express";
import { PaymentsService } from "./payments.service";
@@ -64,6 +65,7 @@ export class PaymentsController {
}
@Post("initiate")
@IsPublic()
@ApiOperation({
summary: "Initiate payment with nationality-based payment methods",
description: `Initiates payment for a booking with support for multiple payment providers:\n\n**Ethiopian Payment Methods:**\n- TELEBIRR - Ethiopia's leading mobile money\n- CBE_BIRR - Commercial Bank of Ethiopia\n- EBIRR - Electronic payment gateway\n\n**Djiboutian Payment Methods:**\n- WAAFI - Djibouti's mobile money service\n\n**International Payment Methods:**\n- CARD - Visa, Mastercard\n- WALLET - Internal wallet balance\n\n**Multi-Currency:**\n- All transactions processed in ETB\n- Display amounts in ETB, DJF, or USD\n- Real-time exchange rate conversion`,
@@ -73,12 +75,14 @@ export class PaymentsController {
}
@Get("intents/:bookingId")
@IsPublic()
@ApiOperation({ summary: "Get payment intent status for a booking" })
getIntent(@Param("bookingId") bookingId: string) {
return this.service.getIntentByBookingId(bookingId);
}
@Get("waafi/return")
@IsPublic()
@ApiOperation({
summary:
"DEMO ONLY — confirm a Waafi payment from the browser-return params and return JSON for the " +
@@ -119,6 +123,7 @@ export class PaymentsController {
}
@Get("methods")
@IsPublic()
@ApiOperation({
summary: "List payment systems supported by the platform",
description:
@@ -131,6 +136,7 @@ export class PaymentsController {
}
@Get("checkout")
@IsPublic()
@ApiOperation({
summary: "Browser checkout redirect",
description:

View File

@@ -835,7 +835,7 @@ export class PaymentsService {
status: 'CONFIRMED',
totalMinor: booking.totalMinor,
currency: booking.currency,
},
} as any,
});
const journeySegments: any[] = [];