I am on Unity 2018.4.9f1 and IAP 1.22, Android.
I’m stuck with a problem how to detect/check if non-consumable purchase has been cancelled by store (e.g. user request or directly in dev console)? Despite purchase is really cancelled I still get info from IAP that user owns sku and receipt has “purchaseState” property set to zero meaning purchase is valid.
I am pretty sure in my previous game (Unity 2017, IAP 1.20) I tested such situations and game logic handled them very well (with some delay from google store).
It’s been 2 day since i cancelled purchase and still has a valid receipt for it.
I tested it with IAP 1.20 and IAP 1.22, unfortunately, both of which performed consistently and did not support refunds. Can you use IAP 1.20 to reproduce the support for refunds so that we can investigate further? You can download the previous IAP version from https://discussions.unity.com/t/698742 .
@SamOYUnity3D , I never said I tested 1.20 nowadays. I do remember when I published my previous game that I tested in-app purchases a lot. Long story short it seems like Google changed purchase cancellation rules or something …
But let’s back to my test actions:
As a dev I can cancel any purchase … but will not get any notification in IAP about that. I am not sure if cleaning google play store cache can help either.
As a user I can request purchase cancellation … but there is some unclear/fuzzy Google’s rules to me and my request might be rejected. I cant say for sure but 1st request to cancel purchase Google accepted and I get null receipt(well technically I didn’t get info about this sku) for previously cancelled purchase (in my case more then 24 hours). All others requests to cancel test purchases were rejected by Google. I should note that I am not only beta tester but also “license tester”.
I’ve tested my already published game(IAP 1.20) right now and get the same results as above…
If someone could tell me is there a strict rules for in-app cancellation in Google Play it would be nice
Meanwhile I will try another attempt with clean tester account to check again situation with user request for purchase cancellation accepted by Google to see if IAP will clear/null purchase receipt.
Have you checked the “Revoke” option? If the “Revoke” option is checked, the purchase receipt will be cleared after the refund (may take some time). If the “Revoke” option is not checked, the receipt will not be cleared after the refund, meaning that the user can still own the item.
@SamOYUnity3D@Cyblam
I am also have same issue. I was purchase an non-consumable from my Android game. Then I was cancel it with the option on screen shoot. (Revoke was checked) Than I was open the game. When I was start the game I check the purchase is valid.
For Android:
GooglePlayReceipt google = productReceipt as GooglePlayReceipt;
if (null != google) {
Debug.Log("->>>>>>>>>>>>>>>>>>State: "+google.purchaseState.ToString());
if (google.purchaseState == GooglePurchaseState.Cancelled ) {
validPurchase = false;
}
}
Installed Version : 1.23.0
Unity Version : 2018.4.12f1
The debug log always push “Purchased” because of this user always has this non-consumable product. Could anyone help me about this issue? Is that wrong something?
Could you print out the transaction ID and find it in the order management page, then take a screenshot to tell us the status of the order? Thank you.
Debug.Log(“********************transactionID:” + productReceipt.transactionID);