i***@163.com
i***@163.com
  • 发布:2024-10-15 11:18
  • 更新:2024-10-29 17:17
  • 阅读:316

uni-app项目在安卓上能够正常微信支付,当在苹果iOS系统上进行微信支付报“商户传入的appid参数不正确,请联系商户处理”

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 1

HBuilderX类型: 正式

HBuilderX版本号: 4.15

手机系统: iOS

手机系统版本号: iOS 17

手机厂商: 苹果

手机机型: iPhone13

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

支付的逻辑代码
uni.requestPayment({
"provider": "wxpay",
"orderInfo": {
"appid": "wx4a19c0df3df1e717", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
"noncestr": resData.nonceStr, // 随机字符串
"package": "Sign=WXPay", // 固定值
"partnerid": resData.merchantId, // 微信支付商户号
"prepayid": resData.pay_data, // 统一下单订单号
"timestamp": resData.timeStamp, // 时间戳(单位:秒)
"sign": resData.paySign // 签名,这里用的 MD5/RSA 签名
},
success(res) {
that.payResult('success');
console.log(res)
},
fail(err) {
console.log(err)
err.errMsg !== 'requestPayment:fail cancel' && that.payResult('fail');

      }  
  })  

预期结果:

预期结果:是希望能够在ISO设备上进行微信支付

实际结果:

实际结果:当在苹果iOS系统上进行微信支付报“商户传入的appid参数不正确,请联系商户处理”

bug描述:

在安卓上能够正常微信支付,当在苹果iOS系统上进行微信支付报“商户传入的appid参数不正确,请联系商户处理”
控制台报的错误是
{
"errMsg": "requestPayment:fail The payment appid configured in HBuilder mainifest.json is inconsistent with the appid used to generate the order. If it is HB debugging, please package it online,https://ask.dcloud.net.cn/article/282",
"code": 9
}
以上操作是用基作连接在苹果设备上进行测试出现的问题,目前app苹果端还没有上线

2024-10-15 11:18 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

请使用自定义基座进行测试

  • i***@163.com (作者)

    用这个报“请查看是否设备未加入到证书列表或者确认证书类型是否匹配”

    2024-10-17 14:38

  • BoredApe

    回复 i***@163.com: 请检查证书类型需要是开发证书。并且是否将测试手机的UDID添加到devices中

    2024-10-17 14:53

  • i***@163.com (作者)

    谢谢已经解决了

    2024-10-18 09:17

  • iosStephen

    回复 i***@163.com: 哥们怎么解决的

    2024-12-18 16:48

1***@163.com

1***@163.com

咋解决的啊我用的是基座不知道发版后会不会有问题

要回复问题请先登录注册