Question

I am using test Product Id (PRODUCT_ID = "1023608") to implement Nokia In-App purchase.

I can successfully purchase an Item using following code snippet.

mHelper.launchPurchaseFlow(this, PRODUCT_ID, RC_REQUEST, this, "");

I am getting succes response in onIabPurchaseFinished.

When I try to query recent purchases using mHelper.queryInventoryAsync(this); I am getting Owned items response: 0.

I was just wondering It should return me the product Id of purchased item.

Can anybody please help me If I am missing anything ?

Thanks :-)

Was it helpful?

Solution

Are you using emulator for testing: Then the known issues would state that "State of test IDs is not stored to back-end when emulator is used to initiate the purchase transactions."

Here's link to it: http://developer.nokia.com/community/wiki/Nokia_X_known_issues

OTHER TIPS

You need to give productBundle as parameter to getPurchases-call. That Bundle should containt products related to your app:

ArrayList<String> products = new ArrayList<String>();
products.add("1023608");
products.add("1023609");
products.add("1023610");

Bundle queryBundle = new Bundle();
queryBundle.putStringArrayList("ITEM_ID_LIST", products);

Bundle ownedItems = mService.getPurchases(3, mContext.getPackageName(), ITEM_TYPE_INAPP, queryBundle, continueToken);

Note that test product ids are not working with getPurchases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top