Docs for Paxful API v1
21
stars
43
forks
source link
app.use((req, res, next) => { const providedSignature = req.get('X-Paxful-Signature'); const calculatedSignature = crypto.createHmac('sha256', apiSecret).update(JSON.stringify(req.body)).digest('hex'); if (providedSignature !== calculatedSignature) { console.log('Request signature verification failed.'); res.status(403).end(); } else { next(); } }); #45
Open
Mame1989 opened 2 years ago