gpt4 book ai didi

android - BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED : and revalidation of the purchase

转载 作者:行者123 更新时间:2023-12-04 14:17:19 36 4
gpt4 key购买 nike

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

acknowledgePurchase(...

重新验证订单的功能?

最佳答案

acknowledgePurchase() 不允许重复购买一件商品。

一个项目不能被购买两次,为了能够再次购买它必须先调用 billingClient.consumeAsync()

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

如果您在等待验证时尝试再次购买,但在返回 之前不调用 acknowledgePurchase(),则购买可能会返回 BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED billingResult.getResponseCode() == BillingClient.BillingResponseCode.OKpurchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED

关于android - BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED : and revalidation of the purchase,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59000033/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com