Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Closed] Unity IAP error NoProductsAvailable on WP8.1

Discussion in 'Unity IAP' started by Aseemy, Apr 19, 2016.

Thread Status:
Not open for further replies.
  1. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Code (CSharp):
    1.     private static string Product25Keys = "item25keys";
    2.     private static string Product50Keys = "item50keys";
    3.     private static string ProductPro = "itempro";
    iap.jpg
    Code (CSharp):
    1.         builder.AddProduct(Product25Keys, ProductType.Consumable, new IDs() {  { Product25Keys, WindowsStore.Name } });
    2.         builder.AddProduct(Product50Keys, ProductType.Consumable, new IDs() { { Product50Keys, WindowsStore.Name } });
    3.         builder.AddProduct(ProductPro, ProductType.NonConsumable, new IDs() { { ProductPro, WindowsStore.Name } });


    Product keys match in code and in app. Earlier did not explicitly put WindowsStore Product id because product ids were same as general identifier. It didnt work, so i explicitly added store-specific identifier. It is still not working.

    I get the error "Store error: NoProductsAvailable" but as you can see clearly there are products available.

    I am the owner of the app, is there a condition that owners cannot use IAP? Should I try using a different microsoft account? Is there anyone else who can download the app for me and test?
     
  2. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Have you downloaded the App from the store as a beta? You have to download it from the store for IAP to work.
     
  3. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    I downloaded it from store. its not in beta, its live. Had a friend download it as well, even he is getting this NoProductsAvailable.

    Here is the link if you wanna test it, http://windowsphone.com/s?appid=a9d9b6d0-06b9-4386-84c5-fc0b33172220
     
  4. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Are you building this as a Universal 8.1 Application, rather than a phone only 8.1 Application?
     
  5. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    No, Under windows Store module in Unity, I have selected Phone 8.1.
     
  6. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    You should deploy it as a Universal 8.1 Application, Unity IAP uses the Universal API.
     
    erika_d likes this.
  7. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Ok, I'll try that and let you know. Thanx.
     
    erika_d likes this.
  8. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Deployed as a UWP 8.1 application. Still the exact same error. What else can I try? Thanks for helping :)
     
  9. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    What's the exact hexadecimal error code that the API is giving you? You should be able to see it in the player log.
     
  10. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    How will this work with live apps? I downloaded the required utility (Windows Phone Power Tools) and connect to my device, but in the app list it only shows my dev apps (apps installed through VS) but not live apps (apps installed through Windows Store).
     
  11. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    If you can't see logging on a live app then you could create a beta version that displays the error code on screen.

    However I suggest raising a support ticket with Microsoft who should be able to tell you why your products cannot be retrieved. I'm not sure how your App got past their review process with non functional IAP.
     
  12. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Thank you for all your help. I will try using some other authors plugins for IAP API and if they dont work then i'll raise a support ticket. Whatever results i will update them here as well.
     
  13. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    I am facing the same issue with another plugin.
    Can you provide step by step instructions on how to implement UnityIAP with WP8.1/UWP 8.1. All the tutorials i could find were for android/ios.

    Can you provide a link for this? I clicked on the support link in my microsoft developer account and it asks for $499 for support. which i cannot afford.
     
  14. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    We have a step by step windows store guide in the manual here.
     
  15. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    This is exactly what i did.
    this tutorial doesnt mention any changes required for the package.manifest file.
    On many support sites i see that we are supposed to enter PhoneProductId nad PhonePublisherId
    Like so
    Code (CSharp):
    1. <Identity Name="eb6d0921-97d3-4c3a-9e9f-3b846cb1e9e5" Publisher="CN=BadlySynced" Version="1.0.0.0" />
    2.   <mp:PhoneIdentity PhoneProductId="a9d9b6d0-06b9-4386-84c5-fc0b33172220" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
    3.  

    But all these posts seem to be before unity added wp8.1 inside the module "Windows Store".
    I did add the required IDs but alas no success.

    Like you I am confused as to how my app was passed and put on live store (5 times, i update a lot).

    Can you tell me if there are any other steps involved except the ones in the tutorial.
     
  16. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Have you associated your visual studio project with the store? I believe you have to when you publish your Application, but that should be the process that sets your project ID and publisher ID. If your app is in the store I can't see how these would not be set.
     
    nicholasr likes this.
  17. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    My app is in the store, yes i have associated my project. These are the items that are set by store association:
    Package Display Name
    Package Name
    Publisher ID
    Publisher Display Name
    Version

    These are not set by this process
    PhoneProductId
    PhonePublisherId
     
  18. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    You can try setting PhoneProductId and PhonePublisherId; according to Microsoft's docs these map to ProductID and PublisherID respectively. Have you done so?
     
  19. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Yes i have done so, thank you for trying to help me but i have accepted defeat here.
     
  20. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    I have made another app on UWP 10 and IAP system is working on it. I still have no luck in fixing why its not wokring in this app. If i do find a way, i'll let you all know.
     
    erika_d likes this.
  21. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    I ported the same app to UWP 10, no changes made to the IAP.
    It WORKS.

    Still not working on WP8.1. Clearly i am missing something.
     
  22. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Aseemy,

    I'm glad to hear it's working on WP10 at least! Unfortunately, we have not been able to duplicate this issue, the same code for 10 should work for 8.1... :(

    @Banderous suggested contacting Microsoft support above for finding out why your products can't be retrieved. Try this link for their support: https://developer.microsoft.com/en-us/windows/support. I tested by selecting the link at "If your issue isn’t listed above, select your type of problem here." and choosing "Support for Writing Apps", "Other" and it didn't look like it was going to charge me, although unfortunately I can not make any guarantees.
     
  23. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    Thank you for this, i have been in contact with the support for the past few days, but unfortunately they have told me that they have not found a problem with my code. They have now redirected me to the msdn community for help or if i choose to, their paid support.

    Have you had any apps made with Unity for Universal 8.1 phone apps work with IAP?
     
  24. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Yes we have an in house App that we test Unity IAP with as a UWP 8.1 App. They did not provide any further information about where the problem might be?
     
  25. Aseemy

    Aseemy

    Joined:
    Aug 22, 2015
    Posts:
    207
    They have no idea. Can you provide me the appxpackage.manifest of you working app? so i can compare with mine to check if i am missing something. I did sent mine to the support and they didnt see a problem in it. Or if you wish i can send mine to you. Since the code is the same for 10 and 8.1, IAPs are live, the only thing that could be wrong is my manifest file.
     
  26. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <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">
    3.   <Identity Name="60072XXX.AmorCam" Publisher="CN=25E85CC7-4E72-4B40-BA9A-E818A9557E7D" Version="1.0.0.0" />
    4.   <mp:PhoneIdentity PhoneProductId="1e5ed04c-bf1e-4faf-a620-0f3d2a028e3e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
    5.   <Properties>
    6.     <DisplayName>IAPDemo</DisplayName>
    7.     <PublisherDisplayName>Alex</PublisherDisplayName>
    8.     <Logo>Assets\StoreLogo.png</Logo>
    9.   </Properties>
    10.   <Prerequisites>
    11.     <OSMinVersion>6.2.1</OSMinVersion>
    12.     <OSMaxVersionTested>6.2.1</OSMaxVersionTested>
    13.   </Prerequisites>
    14.   <Resources>
    15.     <Resource Language="x-generate" />
    16.   </Resources>
    17.   <Applications>
    18.     <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="1e5ed04c-bf1e-4faf-a620-0f3d2a028e3e.App">
    19.       <m3:VisualElements DisplayName="IAPDemo" Square150x150Logo="Assets\MediumTile.png" Square44x44Logo="Assets\AppIcon.png" Description="IAPDemo" ForegroundText="light" BackgroundColor="transparent">
    20.         <m3:DefaultTile DefaultSize="square150x150Logo" ShortName="IAPDemo" Square71x71Logo="Assets\SmallTile.png" />
    21.         <m3:SplashScreen Image="Assets\SplashScreen.png" BackgroundColor="#222C37" />
    22.         <m3:InitialRotationPreference>
    23.           <m3:Rotation Preference="landscape" />
    24.           <m3:Rotation Preference="landscapeFlipped" />
    25.           <m3:Rotation Preference="portrait" />
    26.         </m3:InitialRotationPreference>
    27.       </m3:VisualElements>
    28.     </Application>
    29.   </Applications>
    30.   <Capabilities>
    31.     <Capability Name="internetClient" />
    32.     <Capability Name="internetClientServer" />
    33.   </Capabilities>
    34. </Package>
    Note that this matches the following from the microsoft publisher console:

    "Identity Name" = Package/Identity/Name
    "Publisher" = Package/Identity/Publisher

    PublisherDisplayName may also need to be set to Package/Properties/PublisherDisplayName
     
Thread Status:
Not open for further replies.