Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
找不到UWP应用程序的订阅加载项_Uwp_In App Purchase_Subscription_Add On - Fatal编程技术网

找不到UWP应用程序的订阅加载项

找不到UWP应用程序的订阅加载项,uwp,in-app-purchase,subscription,add-on,Uwp,In App Purchase,Subscription,Add On,我在Microsoft app Store中有一个应用程序配置如下: 市场:241 可见性:公众受众-使项目在Microsoft应用商店中可用但不可发现,并且:仅直接链接:具有直接链接的任何客户 时间表:此产品将尽快提供给客户 基本价格:免费 免费试用:限时30天 然后,我为该应用程序提供了不同的订阅加载项,如下所示: 我的30天订阅配置如下(只是想看看它是否与其他订阅有所不同) 订阅期:每月 免费试用:一个月 市场:在241个市场中提供 可见性:公共-可显示在父产品的Microsoft商店列

我在Microsoft app Store中有一个应用程序配置如下:

市场:241

可见性:公众受众-使项目在Microsoft应用商店中可用但不可发现,并且:仅直接链接:具有直接链接的任何客户

时间表:此产品将尽快提供给客户

基本价格:免费

免费试用:限时30天

然后,我为该应用程序提供了不同的订阅加载项,如下所示:

我的30天订阅配置如下(只是想看看它是否与其他订阅有所不同)

订阅期:每月

免费试用:一个月

市场:在241个市场中提供

可见性:公共-可显示在父产品的Microsoft商店列表中。(请注意,这是此订阅与其他订阅的不同之处。)

发布:尽快

基本价格:免费(因此我无需购买即可进行测试)

其他订阅的配置如下所示:

订阅期:3个月、6个月或12个月

免费试用:无免费试用

市场:在241个市场中提供

可见性:公共-隐藏在Microsoft应用商店中,并且:仅可在父应用程序中购买

发布:尽快

基本价格:免费(因此我无需购买即可进行测试)

下面是Partner Center中的概览屏幕

挑战在于,当我尝试为我的应用程序获取可用的附加组件时,什么都不会回来。下面是我正在运行的代码:

private StoreContext UWPStoreContext;
UWPStoreContext = StoreContext.GetDefault();

string[] productKinds = { "Consumable", "Durable", "UnmanagedConsumable" };
List<String> filterList = new List<string>(productKinds);

StoreProductQueryResult queryResult = await UWPStoreContext.GetAssociatedStoreProductsAsync(productKinds);
在tobj_ProductInfo对象中,我看到以下信息:

如果我在Visual Studio中的项目与app store中的应用程序没有关联,我不相信我会得到这些信息。

因此,通过我在support中打开的支持票证,我现在收到了通过app store中的应用程序购买附加订阅实际上不受支持的信息。我的票号是120081121001365,所有这些都应该记录在这里。我希望没有人像我一样把时间浪费在微软订阅上

更新!!!最后,微软承认他们的商店存在缺陷,在调用计费API时,它没有返回所需/记录的信息。据监控我的罚单的人说,他们正在努力把它修好。一旦他们发布了修复程序,我将在这里发布,让大家都知道

再次更新!! 我不知道发生了什么,但现在我正在从商店取回我所有的附加产品。我现在注意到的一件有趣的事情(请参阅下面的代码了解我所指的内容)是,在下面的代码中,queryresults仍然显示为在调试器中没有值。但是,当您在products集合中循环时,附加产品就在那里

        string[] productKinds = { "Durable", "Consumable", "UnmanagedConsumable" };
        List<String> filterList = new List<string>(productKinds);

        StoreProductQueryResult queryResult = await context.GetAssociatedStoreProductsAsync(filterList);

        if (queryResult.ExtendedError != null)
        {
            // The user may be offline or there might be some other server failure.
            is_Result = $"ExtendedError: {queryResult.ExtendedError.Message}";
            return;
        }

        foreach (KeyValuePair<string, StoreProduct> item in queryResult.Products)
        {
            // Access the Store product info for the add-on.
            StoreProduct product = item.Value;

            // Use members of the product object to access listing info for the add-on...
        }
string[]productKinds={“持久”、“可消耗”、“非托管可消耗”};
列表过滤器列表=新列表(产品种类);
StoreProductQueryResult queryResult=等待上下文。GetAssociatedStoreProductsAsync(过滤器列表);
if(queryResult.ExtendedError!=null)
{
//用户可能处于脱机状态,或者可能存在其他服务器故障。
is_Result=$“ExtendedError:{queryResult.ExtendedError.Message}”;
返回;
}
foreach(queryResult.Products中的KeyValuePair项)
{
//访问附加组件的商店产品信息。
StoreProduct product=项目价值;
//使用产品对象的成员访问加载项的列表信息。。。
}

我希望这对其他人有所帮助。

您能使用中仅定义持久性的代码吗?@RoyLi MSFT这与我使用的代码完全相同(您可以在我上面的示例中看到它。不管怎样,当我放入示例代码并运行它时,我都得到了完全相同的结果。调用wait context.GetAssociatedStoreProductsAsync(新字符串[]{“持久”})得到的结果对象);为空,未返回任何产品。请您提交一个没有试用期的订阅,好吗?@RoyLi MSFT-请查看帖子。我已经有三个订阅没有试用期,三个月、六个月和十二个月的订阅没有试用期。@GeorgeMCeaserJr在我的情况下,基于订阅的附加组件是返回的作为耐用的附加组件。
        string[] productKinds = { "Durable", "Consumable", "UnmanagedConsumable" };
        List<String> filterList = new List<string>(productKinds);

        StoreProductQueryResult queryResult = await context.GetAssociatedStoreProductsAsync(filterList);

        if (queryResult.ExtendedError != null)
        {
            // The user may be offline or there might be some other server failure.
            is_Result = $"ExtendedError: {queryResult.ExtendedError.Message}";
            return;
        }

        foreach (KeyValuePair<string, StoreProduct> item in queryResult.Products)
        {
            // Access the Store product info for the add-on.
            StoreProduct product = item.Value;

            // Use members of the product object to access listing info for the add-on...
        }