C# IAP不适用于Win10Mobile的UWP应用程序
我开发了一个包含IAP的免费UWP应用程序 我为Windows 10 Mobile开发了此应用。我向名为customBackground的商店发布了IAP,并向商店发布了我的应用和IAP 在他们都发布之后,我从商店下载了我发布的应用程序,并尝试购买IAP 但是,它返回了一个系统弹出窗口,显示“此应用内项目在MY-app-NAME中不再可用”。我不知道为什么会这样 存在以下问题:C# IAP不适用于Win10Mobile的UWP应用程序,c#,windows,in-app-purchase,uwp,windows-10-mobile,C#,Windows,In App Purchase,Uwp,Windows 10 Mobile,我开发了一个包含IAP的免费UWP应用程序 我为Windows 10 Mobile开发了此应用。我向名为customBackground的商店发布了IAP,并向商店发布了我的应用和IAP 在他们都发布之后,我从商店下载了我发布的应用程序,并尝试购买IAP 但是,它返回了一个系统弹出窗口,显示“此应用内项目在MY-app-NAME中不再可用”。我不知道为什么会这样 存在以下问题: 当我在visual studio中使用CurrentAppSimulator类在调试模式下进行尝试时,它不会在我的手机
private async void buy_Click(object sender, RoutedEventArgs e)
{
LicenseInformation licenseInformation = CurrentApp.LicenseInformation;
if (!licenseInformation.ProductLicenses["customBackground"].IsActive)
{
Debug.WriteLine("Buying this feature...");
try
{
await CurrentApp.RequestProductPurchaseAsync("customBackground");
if (licenseInformation.ProductLicenses["customBackground"].IsActive)
{
var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.havePurchased);
var b = new MessageDialog(purchaseStat);
b.ShowAsync();
Debug.WriteLine("You bought this feature.");
isIAPValid = true;
}
else
{
var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.notPurchased);
var b = new MessageDialog(purchaseStat);
b.ShowAsync();
Debug.WriteLine("this feature was not purchased.");
}
}
catch (Exception)
{
var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.purchaseFailed);
var b = new MessageDialog(purchaseStat);
b.ShowAsync();
Debug.WriteLine("Unable to buy this feature.");
}
}
else
{
var purchaseStat = LocalizedStrings.GetString(LocalizedStringEnum.alreadyOwned);
var b = new MessageDialog(purchaseStat);
b.ShowAsync();
Debug.WriteLine("You already own this feature.");
isIAPValid = true;
}
}
谢谢 一天后,我发现我的iap工作正常。
这似乎是暂时的问题,微软确实需要改进他们的商店系统。我也有同样的问题。你能解决它吗?也许这只是发布应用程序后的暂时现象,等待一段时间后一切都会好起来?是的,这是暂时的。