There has been a problem occurring on my app. Before launching, I’ve tested countless times to make sure that after refunding a non-consumable product, the reinstalled app does not retrieve the product.
This is the line of code I’ve added which came from the script I modified from the manual sample.
However, recently I discovered that it has changed. Even refunded products are retrieved after reinstallation. I’m assuming it is because Unity IAP could not detect the google receipt properly? The status is refunded on my dev console but when I debugged for google.purchaseState, it returned Purchased instead of Refunded.
google.purchaseState returns an enum of Purchase, Cancelled and Refunded.
If the developer chooses a refund with revoke, the purchased receipt will be cleared and the user will not continue to own the item, but the user can purchase the non-consumable product again.
If the developer chooses a refund without revoke, the purchased receipt will not be cleared and the receipt will be sent when the user first initializes the IAP and is verified as a valid receipt. This means that even if a refund is made, the user will still own the item and the user cannot purchase the non-consumable product again.
Thanks for the response.Yes, revoke has been checked. I received the same results from my own test devices. They did not behave in such way previously.
We are just showing the product state and receipts that are passed to us from the Google Billing API. We are planning to use the next version of their API in an upcoming IAP release, and we will include this scenario in our tests. Are these test purchases, or actual credit card purchases? I’ve also heard reports that it can take some time (24 hours) for Google to process the refunds. And if your app suddenly started behaving differently (you mentioned recently), that might imply a change on the Google end if you made no code changes. We are only a pass through service and do not handle any of the transaction processing.
These are all test purchases and the app is released.
Regarding the delay in refund process, I read that too in one of the thread here, the person claims that product.hasReceipt will return false only after 24 hours or so. However, this isn’t my current situation.
When I tested my app before publishing, I refunded several times and it was not an issue back then. product.hasReceipt returned false. Currently, what I can see, is that all the non-consumable products that were refunded are now detected as purchased and product.hasReceipt returns true.
I understand that it is quite likely to be a change on Google’s end but I was hoping there is a solution to this problem since google.purchaseState should by right get the correct value.
I would like to update that only old purchases on the test devices which were refunded has the said issue, when new purchases were made are refunded, hasReceipt returned false as expected. I am unsure if this is a result after updating to 1.23.1, hope this info helps your team.