verify payment
This commit is contained in:
@@ -5,6 +5,7 @@ import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
||||
import { PaymentMethodService } from '../services/payment-method.service';
|
||||
import { CreatePaymentMethodDto } from '../dto/create-payment-method.dto';
|
||||
import { UpdatePaymentMethodDto } from '../dto/update-payment-method.dto';
|
||||
import { VerifyPaymentDto } from '../dto/verify-payment.dto';
|
||||
import { RestId } from 'src/common/decorators';
|
||||
import { AuthGuard } from 'src/modules/auth/guards/auth.guard';
|
||||
|
||||
@@ -25,6 +26,18 @@ export class PaymentsController {
|
||||
return this.paymentMethodService.findByRestaurant(restId);
|
||||
}
|
||||
|
||||
@Post('public/payments/verify')
|
||||
@ApiOperation({ summary: 'Verify a payment' })
|
||||
@ApiBody({ type: VerifyPaymentDto })
|
||||
@ApiNotFoundResponse({ description: 'Payment not found' })
|
||||
verifyPayment(@Body() verifyPaymentDto: VerifyPaymentDto) {
|
||||
return this.paymentsService.verifyPayment(
|
||||
verifyPaymentDto.authority,
|
||||
verifyPaymentDto.amount,
|
||||
verifyPaymentDto.orderId,
|
||||
);
|
||||
}
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Get('admin/payments')
|
||||
|
||||
Reference in New Issue
Block a user