I have set a notification for new order and disconnect order, After Order create, my webhook url call but in console or log file not get order_id, order_type , order status etc. details.
I want to get order detail(i.e. orderId, orderStatus etc.) when new number order and Disconnect Number.
Also i have add code snippet for webhook url callback function.
Sample Code Snippet
Here, is my api function which i try to read order details
export const getBandwidthOrderNewWebhook = async (req, res) => {
try {
const logMessage = ${new Date().toISOString()} - Request: ${req.res}\n;
// Log the request to the file
fs.appendFileSync('public/api_log.log', logMessage);
console.log(req.res);
res.status(200).json({ msg: true });
} catch (error) {
console.error(error);
res.status(500).json({ msg: 'Internal Server Error' });
}
Description
I have set a notification for new order and disconnect order, After Order create, my webhook url call but in console or log file not get order_id, order_type , order status etc. details. I want to get order detail(i.e. orderId, orderStatus etc.) when new number order and Disconnect Number. Also i have add code snippet for webhook url callback function.
Sample Code Snippet
Here, is my api function which i try to read order details export const getBandwidthOrderNewWebhook = async (req, res) => { try { const logMessage =
${new Date().toISOString()} - Request: ${req.res}\n
;};