const result = await wechatpay.transactions_native({
description: order.title ? order.title : '购买商品', // 商品描述
out_trade_no: orderId, // 订单号
notify_url: 'https://xxxxx.xxxxxx.com/ser/pay-wx-callback', // 支付结果通知地址
amount: {
total: Math.round(order.amount * 100), // 订单金额,单位为分
currency: 'CNY', // 货币类型
},
scene_info: {
payer_client_ip: 'xx,xx,xx,xx', // 用户的客户端 IP
},
});
// 回调接口
app.post("/ser/pay-wx-callback", express.raw({ type: 'application/json' }), async (req, res) => {
回调接口一直没有调用,这是为什么???
V3key是否有设置?域名外网是否可以正常访问?