windows 8 - Purchase simulation dialog does not show up (CurrentAppSimulator.RequestProductPurchaseAsync) -


i developing app windows 8. after while updated project windows 8.1 , got warning, method currentappsimulator.requestproductpurchaseasync(string, boolean) currentappsimulator class deprecated. started using currentappsimulator.requestproductpurchaseasync(string) version of it, , reason purchase simulation dialog not show @ all. here dialog getting using deprecated version of method.

i never needed windowsstoreproxy.xml before, in case checked , set istrial property false - however, dialog not show up, and answer of new method currentappsimulator.requestproductpurchaseasync(string) returns productpurchasestatus::notpurchased.

maybe knows problem?

the notpurchased returned, because file windowsstoreproxy.xml used currentappsimulator not contain requested product. need fill windowsstoreproxy.xml products providing app user. here examples, written microsoft.

windowsstoreproxy.xml created on first launch of app in location:

c:\users\<username>\appdata\local\packages\<app package folder>\localstate\microsoft\windows store\apidata\windowsstoreproxy.xml 

also, after every currentappsimulator.requestproductpurchaseasync(string) call, when result productpurchasestatus.succeeded need 2 things:

  1. grant user product (e.g. purchased item)
  2. inform store, product fulfillment completed successfuly - using method currentapp.reportconsumablefulfillmentasync(string, guid). make sure, fulfillmentresult returned afterwards fulfillmentresult::succeeded

after these steps item should purchased , fulfilled.

check out detailed explanation: enable consumable in-app product purchases.

and if need more clarification of each fulfillmentresult means purchase, can explanation in book "universal windows apps xaml , c# unleashed" adam nathan, found while googling these things.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -