Google IAP 常见异常,产生原因及解决方法

Google IAP 常见错误,产生原因及解决办法

集成Google IAP 常见错误,产生原因及解决办法

  • “The publisher cannot purchase this item”
    • 上传apk的google账号不可以进行支付。
    • http://developer.android.com/google/play/billing/billing_testing.html
    • http://developer.android.com/training/in-app-billing/test-iab-app.html#PlayItemTest
  • “android-in-app-billing-purchase-verification-failed”
  • “item-already-owned”
    • 已经购买过的商品sku。
  • “signature-verification-failed”
    • 签名验证失败。
  • “this-version-of-the-application-is-not-configured-for-billing-through-google-play”
    - IAP接口不能直接Debug,需要部署签名后的APK+Logd的方式调试。
    - 且必须要先上传到google play,12小时后生效。
  • “item-you-requested-is-not-available-for-purchase”
    • 商品id不在列表中。
  • “application-not-configured-for-billing-through-google-play”
    • 应该确保已经上传签名版本的apk
    • 且配置了Billing权限。
    • 之后只需要本地打包安装即可。
  • “in-apps-billing-signature-verification”
    • 签名验证失败。(检查Google提供的public key是否传入正确)
  • “handling-in-app-billing-refunds-in-v3”
    • 不支持v3版本的支付SDK。
  • * “authentication is required. you need to sign into your google account” *
    • 包没有发布到Google Play商店中(alpha测试)。
    • 发布到alpha测试后没有添加添加测试账号。
    • 包名与发布到Google Play商店中的包名不相同。
    • 购买的商品的sku不存在于Google Play商店中已添加的商品列表中。