📅  最后修改于: 2022-03-11 15:01:54.288000             🧑  作者: Mango
const crypto = require("crypto");
const hmac = crypto.createHmac('sha256', RAZORPAY_KEY_SECRET);
hmac.update(razorpayOrderId + "|" + razorpayPaymentId);
let generatedSignature = hmac.digest('hex');
let isSignatureValid = generatedSignature == payload.razorpay_signature;