C# WindowsStore inapp purchase
I'm trying to duplicate the functionality in this sample app from here : http://code.msdn.microsoft.com/windowsapps/Licensing-API-Sample-19712f1a
into an app I'm writing. I've started with working on implementing the ability to buy a consumable item.
What I've done so far:
1.) Copy the function body into the event handler for my "buy" button.
2.) Copy the WindowsStoreProxy.xml from the working sample to replace the one in my project.
3.) Double and triple checked that trial mode is false.
Does not bring up the gui to select a return code in my project code (it did in the sample). Changing "product2" to "2" fixed that problem. However, when the awaited RequestProductPurchaseAsync returns, the following expression:
is still false when in the sample says it should be true, so my code never succeeds.
Are you reading the WindowsStoreProxy.xml into the Simulator?
StorageFolder proxyDataFolder = await Package.Current.InstalledLocation.GetFolderAsync("data"); StorageFile proxyFile = await proxyDataFolder.GetFileAsync("WindowsStoreProxy.xml"); await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile);