Slightly different topic, this issue is describing an explicit Google API call. I have confirmed that ConsumePendingPurchase works as expected using the Sample IAP Project v2 and IAP 3.1.0
No need to downgrade, we haven’t confirmed if this ever has worked. If this wasn’t working in a previous release, we would have no plans to change the transaction flow, too risky for other users.
Can you reply to my first message back to you? What issue are you seeing, perhaps you have multiple accounts here on the forum?
Sorry clearing things up.
The working version we are running is 1.23.3. I’m pretty sure the first version we noticed the bug was 2.2.1 and we’ve tried a few other versions since then.
Is there an update on the status of this bug? November is fast approaching (date for the required v3 billing update), and we have also noticed that our working version of Unity IAP (1.23.3) is not compatible with newer versions of unity. We are currently on 2019.4.5f1
Got it, I have passed this along to engineering. They are looking into it, no ETA yet however.
I am using pre registration bonus too. It works like promo code and Unity IAP doesn’t consume it.
My game is in pre registration now and if this problem will not be fixed before launch I will have to use crutch and to give a bonus to the user only once and to ignore ProcessPurchase for this product in future.
But now I don’t know what to do with this: “If you decide to use pre-registration rewards, failure to deliver pre-registration rewards to users may result in suspension of your app from the Play Store.” Can Google decide that it is failure, because bonuses are not consumed? It will be very pity, if my app will be suspended.
Separate topic, we are also working on promo code support.
This topic is: “Unity IAP doesn’t consume consumable acknowledged purchases”. The product, redeemed with promo code, is acknowledged immediately by Google, but not consumed by Unity IAP. It is not separate topic.
I am pretty sure, if you will fix promo codes, server side verification will be fixed too and vice versa. Logs, behavior and reason of these problems are the same: “Unity IAP doesn’t consume consumable acknowledged purchases”.
Good point. That’s good news then, since we are already working on promo code support.
I have tested a lot of different versions of Unity IAP to confirm.
Here are my results.
In versions from 2.2.0 to 3.1.0 the problem exists.
But in version 2.1.1 and earlier versions everything works great! Unity IAP consumes acknowledged purchases. Acknowledgment on the server works. Promo codes works too.
So problem appears for the first time in version 2.2.0 with Google Play Billing Library v3.
Please, fix this problem.
Tell me please, is version 2.1.1 stable? Can I use it before fix?
We have a similar situation - currently a user does this:
- opens the game and logs into their specific character account (google sign in, guest sign in etc)
- performs an IAP and the receipt is validated on the client and then we send the transaction information to the server and validate the transaction on the server using the google api
- if successful, the server fulfils the purchase (adds relevant info to the db for that characer) and sends the transaction information back to the client to confirm the purchase
- this could cause an issue if the user logs in to the same character account on a different device / using a different google play account between the order being generated and fulfilled as the confirm purchase is sent to the client on the different device / google play account
^^ we have currently always done it in the way above, but we have quite a few workarounds to make it work that is a little ugly - caching transaction id’s etc
preferably, we’d want to simply confirm the purchase on the server at the same time as we fulfil the order - the game is an mmorpg - so everything is server authed - ie, no items are given on the client, so it wouldn’t make sense to confirm the order on the client in this scenario (Game Link)
Your issue may be due to the (required) Google billing v3 library update, and not in Unity IAP code. We are still researching.
Hi, I have looked into your problem and the issue should be fixed in the next release. In the meantime, a workaround would be to consume the products yourself with Google’s ConsumeAsync API. Have a great day!
@WilliamOD Great news. Is there a timeline on when that version is going to be released.
@WilliamOD ConsumeAsync worked.
I call GoogleBillingClient.ConsumeAsync (from IAP 3.2.1). I just added methods to have access to GoogleBillingClient object. (PurchasingManger => m_store (GooglePlayStore) => IGooglePlayStoreFinishTransactionService => m_BillingClient)
In my investigation, I found one strange thing, it seems that Promo Codes has a wrong state, I think the problem is somehow related to GoogleFinishTransactionService.PurchaseNeedsAcknowledgement() filter. It seems promo codes should be considered Non-Acknowledged in order to PurchasingManager.ConfirmPendingPurchase() to work. Hope it will help you.
BTW, can you please provide any estimation for the next release (with this fix)?
Thanks for the help.
We are going to be forced to updated Unity IAP pretty soon, for the billing update and our working version of Unity IAP is deprecated. It would be really helpful to have some timeline of the update that fixes this bug. Shipping with a known bug is going to cause some headaches, especially if we can’t give a timeline for a fix.
I just asked here when the next release is expected, we should have an answer early next week, hopefully on Monday. My estimate for the next release is 1-2 weeks.
Thanks
@robbgray @ZeN12
FYI Unity version 3.2.3 has been released and contains the fix:) Unity IAP package 4.12.2 is now available page-2