const cloudbase = require("@cloudbase/node-sdk");
cloud.init({
env: "<环境ID>",
});
const db = cloud.database();
// 示例:向 orders 集合中插入一条记录
const result = await db.collection("orders").add(wxpayTrigger.output.resource);const cloudbase = require("@cloudbase/node-sdk");
工作流模式支付回调官方给的示例不对呀,如何拿到这个cloud
如果将 const cloudbase = require("@cloudbase/node-sdk");换成const cloud = require('wx-server-sdk') 也还是报错
推荐你用这个sdkhttps://wechatpay.js.org/