libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
224 stars 83 forks source link

requestPurchaseRestore issue #77

Closed tzvetkovg closed 8 years ago

tzvetkovg commented 8 years ago

Hi,

I am trying to restore purchases. When I call requestPurchase(item1) the application exits with the message

12-13 14:47:08.150: E/OpenIAB(30175): In-app billing error: Unable to buy item, Error response: 7:Item Already Owned

but when I call requestPurchaseRestore() I am not getting this item listed under checkTransaction or handleTransaction methods??

I am using gdx-pay 0.5.0

Any ideas on how to properly check whether an item is already purchased?

noblemaster commented 8 years ago

It's possible this has been fixed. Please try 0.8.0-SNAPSHOT!

tzvetkovg commented 8 years ago

Hi noblemaster, thanks.It was my fault. I've basically copied and pasted everything from the platform integration example. There's one line there called if

(checkTransaction(transactions[i].getIdentifier()) == true) break;

When I removed this line the loop's gone through all transactions not just the first one. I didn't know that by calling requestRestorePurchase it will go through the handleRestore method. I thought it only goes through checkTransaction. Anyway, it's all good now. Thank you

noblemaster commented 8 years ago

Thanks for the feedback :)