node-paytmpg 7.2.6 → 7.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -695,6 +695,10 @@ class PaymentController {
|
|
|
695
695
|
console.log(`Razorpay webhook payment order=${razorpay_order_id} payid=${razorpay_payment_id} status=${status}`);
|
|
696
696
|
const reqBody = req.rawBody;
|
|
697
697
|
const signature = req.headers["x-razorpay-signature"];
|
|
698
|
+
if (signature === undefined) {
|
|
699
|
+
res.status(400).send({ message: "Missing Razorpay signature" });
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
698
702
|
const signatureValid = razorpay_1.default.validateWebhookSignature(reqBody, signature, config.SECRET);
|
|
699
703
|
if (signatureValid) {
|
|
700
704
|
if (event === events[0]) {
|
package/dist/package.json
CHANGED