This commit is contained in:
2025-12-06 09:02:03 +03:30
parent 683406a396
commit 83829856ad
4 changed files with 17 additions and 18 deletions
@@ -26,14 +26,7 @@ export class PaymentsController {
return this.paymentMethodService.findByRestaurant(restId);
}
@UseGuards(AuthGuard)
@ApiBearerAuth()
@Get('public/payments/methods/restaurant')
@ApiOperation({ summary: 'Get the restaurant payment methods' })
@ApiNotFoundResponse({ description: 'Restaurant payment methods not found' })
payOrder(@RestId() restId: string) {
return this.paymentMethodService.findByRestaurant(restId);
}
// @UseGuards(AdminAuthGuard)
// @ApiBearerAuth()
@@ -55,9 +55,6 @@ export class PaymentsService {
// return { paymentUrl };
// }
asynv paymentGatewayAuthorize(amount: number, orderId: string, merchantId: string, gateway: PaymentGatewayEnum){
}
async startPayment(orderId: string): Promise<{ paymentUrl: string | null }> {
const { amount, method, restaurantDomain, gateway, merchantId } = await this.validateOrder(orderId);
@@ -105,10 +102,10 @@ export class PaymentsService {
}
async createPayment(domain: string, dto: CreatePaymentDto) {
const { amount, orderId, merchantId, gateway, paymentMethod } = dto;
const { amount, orderId, merchantId, gateway, method } = dto;
const { authority } = await this.paymentGatewayService.requestToGateway(
paymentMethod,
method,
amount,
orderId,
merchantId,