钱诚
钱诚
  • 发布:2022-07-15 10:54
  • 更新:2022-07-26 09:57
  • 阅读:341

官方文档里面的appleiap获取支付渠道过滤

分类:uni-app

uni.getProvider({
service: 'payment',
success: (res) => {
this._channel = res.providers.find((channel) => {
return (channel.id === 'appleiap')
})

    if (this._channel) {  
      success(this._channel)  
    } else {  
      this._channelError = {  
        errMsg: 'paymentContext:fail iap service not found'  
      }  
      fail(this._channelError)  
    }  
  }  
})  

报错误TypeError: undefined is not an object (evaluating 'res.providers.find') __ERROR

官方返回的格式:
{
"errMsg": "getProvider:ok",
"service": "payment",
"provider": ["appleiap"]
}

2022-07-15 10:54 负责人:无 分享
已邀请:
钱诚

钱诚 (作者)

ide版本

7***@qq.com

7***@qq.com

升级了3.5.1还是有这个问题(undefined is not an object (evaluating 'res.providers.find')),为什么?

  • 钱诚 (作者)

    3.5.1.20220707-alpha我的是这个IDE

    2022-07-26 09:34

浩仔

浩仔

我的也有这个问题,而且调用uni.requestPayment()方法没有反应

要回复问题请先登录注册