try {
var tj_json = {
"openid": openid,
"transactionId": transactionId,
"mchId": mchId,
"outTradeNo": outTradeNo
}
console.log("提交", tj_json);
const result = await cloud.openapi.auth.getPaidUnionId(tj_json)
console.log(result);
/*await db.collection('user').doc(openid).update({
data: {
unionid: unionid
}
})*/
} catch (err) {
console.error(err);
}
云函数错误信息:
云函数权限: