问题
I was wondering how to detect a refund, or any type of cancelation of an in-app purchase(not a subscription and not a consumable).
I'm currently making my test and when I refund a test in google like that :
The purchase is still present in billingClient.queryPurchaseHistoryAsync()
(even in queryPurchase()
).
How can I detect such changes and how can I disable my app for refunded users?
Thanks in advance.
回答1:
Have to tried this function
PurchasesUpdatedListener
Listener interface for purchase updates which happen when, for example, the user buys something within the app or by initiating a purchase from Google Play Store.
void onPurchasesUpdated (int responseCode,
List<Purchase> purchases)
Implement this method to get notifications for purchases updates. Both purchases initiated by your app and the ones initiated by Play Store will be reported here.
OnPurchasesUpdated on developer.android
来源:https://stackoverflow.com/questions/52484588/how-to-detect-refund-with-google-billingclient-library