Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handlePurchaseCanceled not called #118

Closed
jsvitek opened this issue Aug 31, 2016 · 4 comments
Closed

handlePurchaseCanceled not called #118

jsvitek opened this issue Aug 31, 2016 · 4 comments

Comments

@jsvitek
Copy link

jsvitek commented Aug 31, 2016

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

@keesvandieren
Copy link
Member

keesvandieren commented Sep 1, 2016

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?

@jsvitek
Copy link
Author

jsvitek commented Sep 3, 2016

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.

keesvandieren added a commit that referenced this issue Sep 3, 2016
Needs unit testing and manual testing before realease
@keesvandieren
Copy link
Member

keesvandieren commented Sep 3, 2016

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 )

@keesvandieren
Copy link
Member

Solved in v0.10.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants