有智慧的码农
有智慧的码农
  • 发布:2022-06-20 15:44
  • 更新:2022-06-20 15:48
  • 阅读:367

【报Bug】unicloud的微信支付今天是不是及其不稳定、

分类:uniCloud

产品分类: uniCloud/App

示例代码:

const unipay = require('uni-pay')
const unipayIns = unipay.initWeixin({
appId: 'xxxxxx',
mchId: 'xxxxx',
key: 'xxxxxx',
})
exports.main = async function(event, context) {
let orderInfo = await unipayIns.getOrderInfo({
body: 'xxxxx',
outTradeNo: event.outTradeNo,
totalFee: event.totalFee,
notifyUrl: 'xxxxxxxxxxx'
})
return {
orderInfo
}
}

操作步骤:

const unipay = require('uni-pay')
const unipayIns = unipay.initWeixin({
appId: 'xxxxxx',
mchId: 'xxxxx',
key: 'xxxxxx',
})
exports.main = async function(event, context) {
let orderInfo = await unipayIns.getOrderInfo({
body: 'xxxxx',
outTradeNo: event.outTradeNo,
totalFee: event.totalFee,
notifyUrl: 'xxxxxxxxxxx'
})
return {
orderInfo
}
}

预期结果:

正常支付

实际结果:

14:45:47.871 PARAM_ERROR JSAPI支付必须传openid
14:45:47.895 Error: PARAM_ERROR JSAPI支付必须传openid
14:45:47.919 at t.default._parse (/tmp/function/@common_modules/uni-pay/index.js:1:60899)
14:45:47.940 at t.default._requestWxpay (/tmp/function/@common_modules/uni-pay/index.js:1:62181)
14:45:47.964 at <anonymous>
14:45:47.989 at process._tickCallback (internal/process/next_tick.js:189:7)

bug描述:

unicloud的微信支付今天一会可以一会又不行,及其的不稳定啊,我是APP支付,报错提示“JSAPI支付必须传openid”,麻烦官方看下什么问题。
上午11点开始出现问题不能支付,中午1点又可以支付,下午2点有不能支付了,3点又可以支付了,现在又不行了,不断的反复

14:45:47.871 PARAM_ERROR JSAPI支付必须传openid
14:45:47.895 Error: PARAM_ERROR JSAPI支付必须传openid
14:45:47.919 at t.default._parse (/tmp/function/@common_modules/uni-pay/index.js:1:60899)
14:45:47.940 at t.default._requestWxpay (/tmp/function/@common_modules/uni-pay/index.js:1:62181)
14:45:47.964 at <anonymous>
14:45:47.989 at process._tickCallback (internal/process/next_tick.js:189:7)

2022-06-20 15:44 负责人:无 分享
已邀请:
有智慧的码农

有智慧的码农 (作者)

不断的反反复复,是不是unicloud APP 微信支付这块今天有什么问题啊?

  • DCloud_uniCloud_WYQ

    更新到最新版的uni-pay,看一下你的app是不是升级到了vue3版本的uni-app

    2022-06-21 10:29

  • 有智慧的码农 (作者)

    回复 DCloud_uniCloud_WYQ: uni-pay我尝试更新了也不行,vue版本选择那里是2

    2022-06-21 11:55

  • 有智慧的码农 (作者)

    回复 DCloud_uniCloud_WYQ: 应该只和unicloud有关系,因为我们APP的历史版本支付全都在抽风,今天我们把微信支付搭建到自己服务器就完全没问题了,旧版本的用户现在完全没办法付款

    2022-06-21 11:57

  • DCloud_uniCloud_WYQ

    回复 有智慧的码农: uni-pay你不主动更新逻辑是不会变的,你可以看下传给uni-pay的参数是不是有变化

    2022-06-21 19:02

要回复问题请先登录注册