-> PurchaseState:订单的购买状态.它总是返回0-更具体地说,如果退款或取消了IAB购买,则mHelper.queryInventoryAsync(mGotInventoryListener)是否仍将其保留在用户的库存中?如果是这样,该如何告知购买已被取消或退款? 更新[2019-12-12]:我已经测试了很多次,并确认了以下内容:如果订单在退款后被取消,它将从 getPurchasesList .发生这种情况所需的时间各不相同.可能需要几分钟到十多个小时.我认为这取决于Google Play何时刷新其缓存.似乎可以打开Goog​​le Play刷新其缓存.在一种情况下, getPurchasesList 退款后十多个小时仍退还了退款的商品,但是打开Goog​​le Play后,该商品就不再退还. 解决方案您是否签出了无效的购买清单API?它返回已取消,退款或退款的购买清单. https://developers.google.com/android -publisher/api-ref/purchases/voidedpurchases/list I have red a lot of posts and Google documents, but am still not clear how to tell an in-app purchase has been refunded. I have red carefully In-App Billing v3 - Don't detect refund and Does Google Play In-App Billing Version 3 support refunds?.I believe that I took the following notes from an official Google document a while ago by copy & paste:Now, the official document has the following:-> purchaseState: The purchase state of the order. It always returns 0-More specifically, if an IAB purchase is refunded or canceled, is that still in the user's inventory obtained by mHelper.queryInventoryAsync(mGotInventoryListener)?If so, how can one tell the purchase has been canceled or refunded? Update [2019-12-12]:I have tested many times and confirmed the following:If an order is canceled after refunding, it will disappear from the results returned by getPurchasesList. The time it takes for this to happen varies. It could be minutes to over 10 hours. I think this depends on when Google Play refreshes its cache. It seems that one can open Google Play to refresh its cache. In one case, getPurchasesList still returned a refunded purchase more than 10 hours after refunding, but it stopped returning it as soon as Google Play is opened. 解决方案 Have you checked out the voided purchase list API? It returns a list of cancelled, refunded or charged-back purchases.https://developers.google.com/android-publisher/api-ref/purchases/voidedpurchases/list 这篇关于如何检测Google应用内结算中已取消或已退款的订单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-19 18:33