liil2ySliil
liil2ySliil
  • 发布:2024-07-04 16:59
  • 更新:2024-07-05 12:45
  • 阅读:38

苹果内购报错,位置错误,code=100

分类:uni-app

代码:uni.getProvider({
service: 'payment',
success: (res) => {
const iapChannel = res.providers.find((channel) => {
return channel.id === 'appleiap'
})
iapChannel.requestOrder(
['001'],
(orderList: any) => {
//必须调用此方法才能进行 iap 支付
console.log('requestOrder success666: ' + orderList)
uni.requestPayment({
provider: 'appleiap',
orderInfo: {
productid: orderList[0].productid,
username: '001',
optimize: true,
},
success: (e) => {
console.log('e -----> ', e)
},
complete: (ee) => {
console.log('ee -----> ', ee)
},
fail: (err) => {
console.log('Payment failed: ', err)
},
})
},
(e: any) => {
console.log('requestOrder failed: ' + JSON.stringify(e))
},
)
},
})
报错:{
"errMsg": "requestPayment:fail Payment_appleiap:Error Domain=SKErrorDomain Code=0 \"发生未知错误\"
UserInfo={NSLocalizedDescription=发生未知错误, NSUnderlyingError=0x3026c52f0 {Error Domain=ASDErrorDomain Code=500 \"(null)\"
UserInfo={NSUnderlyingError=0x3026c4300 {Error Domain=AMSErrorDomain Code=100 \"Authentication Failed\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n \"Error Domain=AMSErrorDomain Code=2 \\"Password reuse not available for account\\"
UserInfo={NSLocalizedDescription=Password reuse not available for account, NSLocalizedFailureReason=The account state does not support password reuse.}\",\n \"Error Domain=AMSServerErrorDomain Code=-5000 \\"(null)\\" UserInfo={failureType=-5000, m-allowed=false, pings=(\n), cancel-purchase-batch=true, customerMessage=\U627e\U4e0d\U5230\U4f60\U8f93\U5165\U7684 Apple\U00a0ID\Uff0c\U6216\U8005\U4f60\U7684\U5bc6\U7801\U4e0d\U6b63\U786e\U3002\U8bf7\U91cd\U8bd5\U3002}\"\n),
NSLocalizedDescription=Authentication Failed, NSLocalizedFailureReason=The authentication failed.}}}}},https://ask.dcloud.net.cn/article/282",
"code": -100
}

2024-07-04 16:59 负责人:DCloud_iOS_WZT 分享
已邀请:
DCloud_iOS_WZT

DCloud_iOS_WZT

Password reuse not available for account 看下你这个商品应该需要传共享密钥 浏览器搜一下这个错误

要回复问题请先登录注册