Closed jsvitek closed 7 years ago
We have an app (on Android and iOS) with one product: ENTITLEMENT, on which purchase cancelled callbacks are called.
Which platform / implementation are you using? For Android, gdx-pay-android-googleplay is recommended.
Maybe you can make a small github project that reproduces the issue?
Thanks for reply @keesvandieren, I forgot to mention it is an Android application that causes the issue. I created sample project that tries to reproduce the issue. It works 100% times for me. Basically I just followed Integration example with resolvers tutorial and added two buttons for purchasing ENTITLEMENT and CONSUMABLE and a text area for messages. Please run the app on Android and follow steps I mentioned above.
Here is the link for the project
Also I am using both gdx-pay-android.jar and gdx-pay-android-googleplay.jar I am not sure whether to use both but in the gdx pay readme file it is said to use both of them.
Thanks for creating a reproduction project!
I reproduced the bug, and pushed a fix to master. It needs to be unit-tested and verified better before releasing it, which I can do later (hopefully next week).
You can test it within your own project, by cloning gdx-pay, installing it in your local Maven repo and setting the version number of gdx-pay dependencies to 0.11.1-SNAPSHOT (procedure is described here: https://github.com/libgdx/gdx-pay#user-content-using-gdx-pay-locally-build-binaries-in-a-project )
Solved in v0.10.3
I have 2 in app products A and B. A is OfferType.ENTITLEMENT while B is OfferType.CONSUMABLE.
Following these steps I manage not to get handlePurchaseCanceled() called on canceling purchase: 1. purchase product A successfully 2. try to purchase product B but cancel IAB purchase window (handlePurchaseCanceled is called correctly) 3. try to purchase product A again - handlePurchaseError is called with response code 7 "item already owned" 4. try to purchase product B but cancel IAB purchase window - handlePurchaseCancelled is not called anymore
I hope I am not missing something