Debug CurrentAppSimulator.GetAppReceiptAsync ()

While for debugging LicenseInformation we are provided with WindowsStoreProxy.xml , in which we can set the necessary parameters when trying to debug the purchase of the application - I can not find anything like it.

Where is it stored?

+5
source share
2 answers

I am not sure where these files are stored, but since I am debugging my applications, I simply create sample receipts for the application ( as in this MSDN link ), and then simply load them from the file as follows:

StorageFile myFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(@"ms-appx:///SampleAppReceipt.xml")); receipt = await FileIO.ReadTextAsync(myFile); 

As soon as I have the receipt line as the same as it will be received from the repository, I parse it using XmlDocument.LoadXml(receipt) or XDocument.Parse(receipt) .

0
source

Receipts are generated either using the Simulator Store or based on available data. In the second case, you first configure the simulator:

 StorageFile proxyFile = await Package.Current.InstalledLocation.GetFileAsync(localPathToFile); await CurrentAppSimulator.ReloadSimulatorAsync(proxyFile); 

And then request the appropriate receipts:

 // Simulator generates receipts based on data you provided earlier String receipt = await CurrentAppSimulator.GetAppReceiptAsync(); String prettyReceipt = XElement.Parse(receipt).ToString(SaveOptions.None); 
-1
source

All Articles