This commit is contained in:
aozhiwei 2024-06-26 17:59:39 +08:00
parent a5e577b5d3
commit adb84341f6

View File

@ -46,6 +46,10 @@ async function webhooks(req, rsp) {
console.log(req.body);
const events = [];
let sdkEnv = config.Environment.PRODUCTION;
if (utils.isOnlineEnv()) {
sdkEnv = config.Environment.SANDBOX;
}
await webhook.handle( // this method will handle the subscription confirmation and signature & sender verification
req.body,
config.Environment.SANDBOX, // or config.Environment.PRODUCTION