H5页面支付
调取订单下单接口拿到订单内容和id,
调取支付二维码接口,传入上面拿到的id,
返回二维码url链接,运用二维码插件qrcodejs2(npm i qrcodejs2), 生成二维码
定时查询返回状态是否支付
生成二维码方法
new QRCode(document.getElementById(‘qrcode’), {
text: qrCodeUrl, // 二维码地址
width: 300, // 二维码宽度
height: 300, // 二维码高度
correctLevel: QRCode.CorrectLevel.H, // 二维码容错级别 H M L
});
微信小程序支付
H5页面支付 微信小程序支付
最新推荐文章于 2024-04-23 10:30:35 发布