0
我创建了一个应用程序,添加了应用程序内购买,并将其作为测试版上载。检查应用程序内购买信息wp8中的崩溃
这里是应用内购买代码。
Private async void Purchase()
{
LicenseInformation licenseInformation = CurrentApp.LicenseInformation;
string str;
try
{
var listing = await CurrentApp.LoadListingInformationAsync();
var _price = listing.FormattedPrice;
// start product purchase
await CurrentApp.RequestProductPurchaseAsync("FeatureName", false);
ProductLicense productLicense = null;
if (CurrentApp.LicenseInformation.ProductLicenses.TryGetValue("FeatureName", out productLicense))
{
if (productLicense.IsActive)
{
MessageBox.Show("Product purchased");
CurrentApp.ReportProductFulfillment("FeatureName");
ProductPurchased(); // It display product purchased & trigger full version
return;
}
else
{
str = "Purchase failed";
ShowErrorPopup(str); // It shows error msg. purchase failed.
return;
}
}
}
catch (Exception)
{
str = "Purchase failed. Check internet connection and try again";
ShowErrorPopup(str);
return;
}
}
安装测试版本时,我点击了购买按钮。我去购买点。
它要求安装或取消。
通过安装或取消将杀死应用程序。
我做了什么错误。有人帮助解决这个问题?
调试时它会失败吗?如果是这样,它会失败吗?您可以通过设置WMAppManifest.xml中的ProductID和PublisherID来匹配设备上的调试,以便与商店为您的应用程序和您的产品匹配 –
现在就工作了。谢谢 – SaravanaKumar
解决方案是什么?有什么问题?如果有人回答这个问题给他们道具。如果您发现解决方案发布它。帮助社区 –