📜  Razorpay 在节点 js 中生成签名 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:54.288000             🧑  作者: Mango

代码示例1
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;