What kind of ID goes into RequestProductPurchaseAsync?

一笑奈何 提交于 2019-12-10 19:41:35

问题


What's the meaning of the ProductID parameter of CurrentApp.RequestProductPurchaseAsync on Windows Phone 8, please? Is that the "Product identifier" that I provide when registering a product in the Dev Center on the Properties page? Or is it the GUID of the in-app product that the Store is using internally?

The reason why I'm asking, some Store-related APIs do expect a GUID.

My app only has one product; there's no selection process. I'd rather call RequestProductPurchaseAsync with a hard-coded productId without retrieving the listing first.

EDIT: only answers from experience, please. I've read the MSDN; it allows for both interpretations.


回答1:


From testing on a real phone: the scenario works. No need to pull the listing. The productId should be the string that you type in the Dev Center as "Product identifier".




回答2:


According to MSDN document productId parameter specifies the id of the product or feature to purchase. It is that product identifier which you provide when registering an app in the store. ProductId must be unique for each in-app product

In-app purchase for Windows Phone 8

In-app purchase testing for Windows Phone 8

Adding Subscriptions to Windows Phone app as an in-app purchase



来源:https://stackoverflow.com/questions/15907475/what-kind-of-id-goes-into-requestproductpurchaseasync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!