Posts

Showing posts with the label In App Purchase

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, ...

"Cannot Connect To ITunes Store" In-app Purchases

Image
Answer : Make sure you have signed out of any production iTunes accounts on the device. I was getting this error on my test phone which was logged in with my actual iTunes account. You cannot test apps using your production iTunes account, hence the error. I just wish Apple provided a better error so as to avoid this guesswork... see In-App Purchase FAQ: Cannot connect to iTunes Store Your app is running in the Simulator, which does not support In-App Purchase For testing in app purchases always use real devices. For newcomers, make sure your in-app purchasing product's status is Ready to Submit , with no "missing metadata". In my case, what was missing was the localization of the subscription's group.