uni-app 苹果支付发生未知错误 No auth plugin to verify credentials for accounts of type
uni-app 苹果支付发生未知错误 No auth plugin to verify credentials for accounts of type
信息类别 | 详情 |
---|---|
产品分类 | uniapp/App |
PC开发环境操作系统 | Mac |
PC开发环境操作系统版本号 | macOS 14 |
HBuilderX类型 | 正式 |
HBuilderX版本号 | 4.41 |
手机系统 | iOS |
手机系统版本号 | iOS 18 |
手机厂商 | 模拟器 |
手机机型 | iPad Air 5 |
页面类型 | vue |
vue版本 | vue2 |
打包方式 | 云端 |
项目创建方式 | HBuilderX |
示例代码:
// 请求苹果支付
const transaction = await this._iap.requestPayment({
productid: this.applePayInfo.productId,
manualFinishTransaction: false, //手动关闭订单,值为 false 时支付完成后自动关闭订单,true时不关闭订单,需要在合适的时机调用 finishTransaction 关闭订单。建议设置为 true, 默认值为 false 是为了向下兼容
username: orderno //username + orderId //根据业务需求透传参数,关联用户和订单关系
});
操作步骤:
调用苹果支付
预期结果:
返回支付结果
实际结果:
支付失败 错误如上
bug描述:
i不是所有的苹果设备会出现,目前在iPad Air 5上支付不成功, { “errMsg”: "requestPayment:fail Payment_appleiap:Error Domain=SKErrorDomain Code=0 “发生未知错误” UserInfo={NSLocalizedDescription=发生未知错误, NSUnderlyingError=0x600002528360 {Error Domain=ASDErrorDomain Code=500 “Unhandled exception” UserInfo={NSMultipleUnderlyingErrorsKey=( “Error Domain=AMSErrorDomain Code=2 “发生未知错误。请再尝试一次。” UserInfo={NSLocalizedDescription=发生未知错误。请再尝试一次。}” “Error Domain=com.apple.accounts Code=4 “No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox” UserInfo={NSLocalizedDescription=No auth plugin to verify credentials for accounts of type com.apple.account.iTunesStore.sandbox}” ), NSLocalizedDescription=Unhandled exception, NSLocalizedFailureReason=An unknown error occurred}}}
更多关于uni-app 苹果支付发生未知错误 No auth plugin to verify credentials for accounts of type的实战教程也可以访问 https://www.itying.com/category-93-b0.html