问题
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