We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think we need to have something for verification the event like this
app.post('/webhook', (req, res) => { const event = req.body; // Verify the event (implement verification logic if necessary) if (!verifyMangopaySignature(req)) { return res.status(400).send({ status: 'error', message: 'Invalid signature' }); } }) function verifyMangopaySignature(req) { const signature = req.headers['x-request-signature']; const body = JSON.stringify(req.body); const secretKey = 'your_mangopay_secret_key'; // Replace with your actual secret key const hash = crypto .createHmac('sha256', secretKey) .update(body) .digest('hex'); return signature === hash; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think we need to have something for verification the event like this
The text was updated successfully, but these errors were encountered: