BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED:以及购买的重新验证

问题描述 投票:0回答:1

[如果应用中的购买呼叫BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED:需要调用

acknowledgePurchase(...

重新启用订单的功能?

android android-studio in-app-billing
1个回答
0
投票

acknowledgePurchase()不允许购买两次。

无法购买两次,必须先通过致电billingClient.consumeAsync()消费,才能再次购买,>

[acknowledgePurchase()需要在成功购买后的短时间内调用,即billingResult.getResponseCode() == BillingClient.BillingResponseCode.OKpurchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED不这样做会使购买的商品退款。

如果您在验证待定期间尝试再次购买,但在返回BillingClient.BillingResponseCode.ITEM_ALREADY_OWNEDacknowledgePurchase()之前不致电billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK,则购买可能会返回[C0

© www.soinside.com 2019 - 2024. All rights reserved.