You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used both the methods below mention and have encountered that what ever i try i am i getting unverified
i printed the custom signature generated it is resulting in some other signature than in the headers of the webhook call
exportdefaultasyncfunctionhandler(req,res){constsecret=process.env.RAZORPAY_WEBHOOK_SECRET;constsignature=req.headers['x-razorpay-signature'];constbody=JSON.stringify(req.body);// Verify webhook signatureconstgenerated_signature=crypto.createHmac('sha256',secret).update(body).digest('hex');if(generated_signature===signature){constevent=req.body.event;if(event==='payment.captured'){constpayment=req.body.payload.payment.entity;constpaymentId=payment.id;constorderId=payment.order_id;// Update order status in your database// e.g., markOrderAsPaid(orderId, paymentId);}res.status(200).json({status: 'success'});}else{res.status(400).json({status: 'verification_failed'});}}
in both the ways i am getting different signature in webhook header then i am creating expected signature and the function razopay is giving is also returning false in this particular case
can some one help me out if i am doing wrong
The text was updated successfully, but these errors were encountered:
I used both the methods below mention and have encountered that what ever i try i am i getting unverified
i printed the custom signature generated it is resulting in some other signature than in the headers of the webhook call
and also
in both the ways i am getting different signature in webhook header then i am creating expected signature and the function razopay is giving is also returning false in this particular case
can some one help me out if i am doing wrong
The text was updated successfully, but these errors were encountered: