"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const payment_controller_1 = require("../controllers/payment.controller");
const auth_middleware_1 = require("../middleware/auth.middleware");
const rbac_middleware_1 = require("../middleware/rbac.middleware");
const router = (0, express_1.Router)();
// Public / User Payment Endpoints
router.post('/initiate', auth_middleware_1.authenticateJWT, payment_controller_1.initiatePayment);
router.post('/verify-razorpay', auth_middleware_1.authenticateJWT, payment_controller_1.verifyRazorpayPayment);
router.get('/invoice/:orderId', payment_controller_1.getInvoice);
// Webhook Endpoints
router.post('/webhook/razorpay', payment_controller_1.razorpayWebhook);
// Admin Management Endpoints
router.post('/refund', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), payment_controller_1.refundPayment);
router.get('/logs', auth_middleware_1.authenticateJWT, (0, rbac_middleware_1.authorizeRoles)('ADMIN'), payment_controller_1.getPaymentLogs);
exports.default = router;
//# sourceMappingURL=payment.routes.js.map