Posts

Showing posts with the label In App Billing

Android: Inapp Billing: Error Response: 7:Item Already Owned

Answer : You purchased "android.test.purchased" but did not consume it. However, if you forgot to consume it immediately, it is not easy to consume it again. We can wait for 14 days. The fake purchase will be cleared automatically. But it is not acceptable. I spent a lot of time finding the solution: Add this line to get debug info. _iabHelper.enableDebugLogging(true, "TAG"); Run the app. In LogCat, you will see a json string like {"packageName":"com.example","orderId":"transactionId.android.test.purchased","productId":"android.test.purchased","developerPayload":"123","purchaseTime":0,"purchaseState":0,"purchaseToken":"inapp:com.example:android.test.purchased"} Consume it manually (Replace THAT_JSON_STRING with your json string) Purchase purchase; try { purchase = new Purchase("inapp", THAT_JSON_STRING, ...