1
votes

I am trying to implement in app purchase in my app for windows phone 8 with no luck. I've created a beta app and added an in app purchase product to it. I took the product id from the Beta app and put it in the WMAppManifest.xml file and recompiled. I tried running the app in the emulator and on my device with no luck!

I've titled the product FullVersion for both the alias and in app name;

In my app here's how I am checking the purchase and proceeding with the transaction. It opens the purchase page but says "Can't find item in catalog - We looked but can't find the item you wanted to buy."

    private async void Upgrade_Click(object sender, EventArgs e)
    {

        if (!Store.CurrentApp.LicenseInformation.ProductLicenses["FullVersion"].IsActive)
        {
            ListingInformation li = await Store.CurrentApp.LoadListingInformationAsync();
            string receipt = await Store.CurrentApp.RequestProductPurchaseAsync("FullVersion", false);
        }
    }
2

2 Answers

0
votes

You cannot "really" test in-app purchases. If you publish an app to the store there is no "connection" to the app you run from Visual Studio when debugging. That is the reason you get the "Can't find item in catalog - We looked but can't find the item you wanted to buy.".

The only way to test in app purchases is to use this mocking library http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681689(v=vs.105).aspx

Looks like there us a way after all: "Publish an app, then take the Product ID of the published app and add it to the Visual Studio project. This allows the project to use the production in-app purchase products"