const express = require("express");
const bodyParser = require("body-parser");
const router = express.Router();
const webhookController = require("../controllers/webhookcontroller");

// STRIPE 
router.post(
   "/stripe",
  bodyParser.raw({ type: "application/json" }),
  webhookController.handleWebhook
);

// PAYPAL 
router.post(
  "/paypal",
  express.raw({ type: "application/json" }),
  webhookController.paypalWebhook
);

// BRAINTREE
router.post(
  "/braintree",
  express.raw({ type: "application/json" }),
  webhookController.braintreeWebhook
);

module.exports = router;
