none
In App Purchasing not working for UWP 8.1 Phone app RRS feed

  • Question

  • I have made a small game for WP8.1 using the universal platform using Unity game engine. I have also ported the same game to Universal 10 platform without changing the IAP code (I have been informed by the Unity people that the same code should work).

    So the same code does work on Universal 10 (PC,Mobile) but it doesnt work on WP8.1.Users get the error that No Products were found, and then if the user clicks on the product button, then a verifying message comes and it shows : "We have looked, but we cant fint the item you wanted to buy" Cant find item in Catalogue.

    Since the same code works on W10, items are active in my dashboard.

    I read that for WP8.1 IAPs wont work for the first package beacuse the Package.appxmanifest file has a randomly generated PhoneProductId, and it is only generated after the app has been published. So i updated my packages and published them again with correct values. Its still not working.

    Below is my manifest file, do let me know if i have done something wrong. Thankx

    <?xml version="1.0" encoding="utf-8"?>
    <Package xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns="http://schemas.microsoft.com/appx/2010/manifest">
      <Identity Name="4299BadlySynced.ColorsFunandLearn" Publisher="CN=2608D4DC-76FA-4032-A82C-8C89BE69EF7C" Version="1.2.2.0" />
      <mp:PhoneIdentity PhoneProductId="a9d9b6d0-06b9-4386-84c5-fc0b33172220" PhonePublisherId="56f66699-f531-418f-807b-0e39a42ee76f" />
      <Properties>
        <DisplayName>Colors : Fun and Learn</DisplayName>
        <PublisherDisplayName>Badly Synced</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png</Logo>
      </Properties>
      <Prerequisites>
        <OSMinVersion>6.2.1</OSMinVersion>
        <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
      </Prerequisites>
      <Resources>
        <Resource Language="x-generate" />
      </Resources>
      <Applications>
        <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="eb6d0921-97d3-4c3a-9e9f-3b846cb1e9e5.App">
          <m3:VisualElements DisplayName="Colors : Fun and Learn" Square150x150Logo="Assets\MediumTile.png" Square44x44Logo="Assets\AppIcon.png" Description="Learn About Colors For Kids" ForegroundText="light" BackgroundColor="transparent">
            <m3:DefaultTile DefaultSize="square150x150Logo" ShortName="Colors" Square71x71Logo="Assets\SmallTile.png">
              <m3:ShowNameOnTiles>
                <m3:ShowOn Tile="square150x150Logo" />
              </m3:ShowNameOnTiles>
            </m3:DefaultTile>
            <m3:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#222C37" />
            <m3:InitialRotationPreference>
              <m3:Rotation Preference="portrait" />
            </m3:InitialRotationPreference>
          </m3:VisualElements>
        </Application>
      </Applications>
      <Capabilities>
        <Capability Name="internetClientServer" />
      </Capabilities>
    </Package>

    Saturday, June 11, 2016 12:44 AM

All replies

  • I have talked to Microsoft Dev Support, and they have redirected me back to this forum. They told me that you should ask the community for help as someone might have faced a similar issue. They have not been able to solve my problem, so you guys are my only hope.

    So please, if anyone has any idea, do let me know.
    Sunday, June 12, 2016 3:21 AM
  • Hello BadlySynced,

    What's your code to get the product and how did you publish your app to the store, both WP8.1 app and UWP app reserve the same name?

    Your windows phone 8.1 app is using Windows Runtime or Windows Phone Silverlight? 

    I think I need to know more details to help you troubleshoot this issue. And by the way, most of the time, if the code is alright but you cannot find the item from dashboard, maybe the problem is pending on the Server side, in this way, it is also hard for us to find the reason.

    Best regards,

    Barry 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 13, 2016 7:41 AM
    Moderator
  • Hi, Thanks you replying.

    This is the code which returns no product found.

    /// <summary>
            /// Gets the in app products for this app
            /// </summary>
            /// <param name="response">Callback containing the products found</param>
            public static void GetProductListings(Action<List<WSAProduct>> response)
            {
    #if NETFX_CORE
                GetProductListingsAsync(response);
    #endif
            }
    
    #if NETFX_CORE
            private static async void GetProductListingsAsync(Action<List<WSAProduct>> response)
            {
                ListingInformation listings = null;
    
                try
                {
                    if (_isTest)
                    {
                        listings = await CurrentAppSimulator.LoadListingInformationAsync();
                    }
                    else
                    {
                        listings = await CurrentApp.LoadListingInformationAsync();
                    }
                }
                catch
                {
                }
    
                List<WSAProduct> products = new List<WSAProduct>();
    
                if (listings != null)
                {
                    foreach (ProductListing product in listings.ProductListings.Values)
                    {
                        products.Add(new WSAProduct()
                        {
                            Id = product.ProductId,
                            Name = product.Name,
    #if (UNITY_WSA_10_0 || UNITY_WP_8_1)
                            Description = product.Description,
                            ImageUri = product.ImageUri,
    #endif
                            FormattedPrice = product.FormattedPrice,
                            ProductType = Enum.GetName(typeof(ProductType), product.ProductType)
                        });
                    }
                }
    
                if (response != null)
                {
                    response(products);
                }
            }
    #endif

    I am using Unity (Game Engine) which allows me to deploy the same code for both UWP 10 and WP8.1 (Universal as well). Unity people have confirmed that the same code will work for both the platforms.

    Yes both 8.1 and 10 use the same reserved name . My app has been live for over a month. IAPs work on 10 but not on 8.1.

    App is not Silverlight.

    Let me know if you require more information.

    Tuesday, June 14, 2016 6:14 AM
  • @BadlySynced,

    The code CurrentApp.LoadListingInformationAsync should work in your Universal 8.1 app(WP8.1), can the " Microsoft Dev Support" engineer help you check the values in the store/dashboard? I'm thinking that the problem may pending on the server side and we do not have a way to verify it.

    Best regards,

    Barry


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 15, 2016 10:47 AM
    Moderator
  • I am an Indie Dev, so i cant afford their offer of "We do also offer the option of paid technical support should you not wish to pursue the community option.". So you are my only hope. 

    You mention that the problem may be pending on the server side, what could be the issue? the same IAP work for the UWP 10 version of the app, so that means the IAPs are live. 

    the " Microsoft Dev Support" engineer asked me to make my IAPs invisible, then visible again in another update. Still not working. The engineer confirms that the IAPs are live in the store, but my app returns 0 products.
    Wednesday, June 15, 2016 11:35 AM
  • what should i do ???
    Thursday, June 23, 2016 6:35 AM