mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
Nationality, guest booking, waafi adapter, overall booking flow updates
This commit is contained in:
@@ -10,9 +10,44 @@ import { JwtGuard } from '../../common/jwt.guard';
|
||||
@ApiBearerAuth('JWT-auth')
|
||||
export class PaymentsController {
|
||||
constructor(private service: PaymentsService) {}
|
||||
@Post('initiate') @ApiOperation({ summary: 'Initiate payment for a booking' }) initiatePayment(@Body() dto: InitiatePaymentDto) { return this.service.initiatePayment(dto); }
|
||||
@Get('intents/:bookingId') @ApiOperation({ summary: 'Get payment intent status for a booking' }) getIntent(@Param('bookingId') bookingId: string) { return this.service.getIntentByBookingId(bookingId); }
|
||||
@Post('refund') @ApiOperation({ summary: 'Refund a confirmed booking' }) refund(@Body() dto: RefundDto) { return this.service.refund(dto); }
|
||||
@Post('methods') @ApiOperation({ summary: 'Add a payment method' }) addMethod(@Body() dto: AddPaymentMethodDto) { return this.service.addPaymentMethod(dto); }
|
||||
@Get('methods/:userId') @ApiOperation({ summary: 'Get payment methods for user' }) getMethods(@Param('userId') userId: string) { return this.service.getPaymentMethods(userId); }
|
||||
|
||||
@Post('initiate')
|
||||
@ApiOperation({
|
||||
summary: 'Initiate payment with nationality-based payment methods',
|
||||
description: `Initiates payment for a booking with support for multiple payment providers:
|
||||
|
||||
**Ethiopian Payment Methods:**
|
||||
- TELEBIRR - Ethiopia's leading mobile money
|
||||
- CBE_BIRR - Commercial Bank of Ethiopia
|
||||
- EBIRR - Electronic payment gateway
|
||||
|
||||
**Djiboutian Payment Methods:**
|
||||
- WAAFI - Djibouti's mobile money service
|
||||
|
||||
**International Payment Methods:**
|
||||
- CARD - Visa, Mastercard
|
||||
- WALLET - Internal wallet balance
|
||||
|
||||
**Multi-Currency:**
|
||||
- All transactions processed in ETB
|
||||
- Display amounts in ETB, DJF, or USD
|
||||
- Real-time exchange rate conversion`
|
||||
})
|
||||
initiatePayment(@Body() dto: InitiatePaymentDto) { return this.service.initiatePayment(dto); }
|
||||
|
||||
@Get('intents/:bookingId')
|
||||
@ApiOperation({ summary: 'Get payment intent status for a booking' })
|
||||
getIntent(@Param('bookingId') bookingId: string) { return this.service.getIntentByBookingId(bookingId); }
|
||||
|
||||
@Post('refund')
|
||||
@ApiOperation({ summary: 'Refund a confirmed booking' })
|
||||
refund(@Body() dto: RefundDto) { return this.service.refund(dto); }
|
||||
|
||||
@Post('methods')
|
||||
@ApiOperation({ summary: 'Add a payment method' })
|
||||
addMethod(@Body() dto: AddPaymentMethodDto) { return this.service.addPaymentMethod(dto); }
|
||||
|
||||
@Get('methods/:userId')
|
||||
@ApiOperation({ summary: 'Get payment methods for user' })
|
||||
getMethods(@Param('userId') userId: string) { return this.service.getPaymentMethods(userId); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user