Search Unity

Subscriptions in UWP

Discussion in 'Unity IAP' started by Nesit, Dec 25, 2019.

  1. Nesit

    Nesit

    Joined:
    Dec 24, 2019
    Posts:
    8
    Having a lot of troubles making subscriptions work in Windows Store. I've tried to search for various thread, but I can't seem to find clear answer, do subscriptions work at all.

    1).They seem to be not initializing correctly during testing. I've tried to test how do they work in testing environment with:

    builder.Configure<IMicrosoftConfiguration>().useMockBillingSystem = true;
    StandardPurchasingModule.Instance().useFakeStoreUIMode = FakeStoreUIMode.StandardUser;


    But products are simply marked as unavailable during IAP initialization. Warnings "Unavailable product: -{product_store_id}" for every subscription product. But non-consumable products initialize correctly. Will it be different when I upload application to store? I suspect they'll work correctly here, but there are few problems with it...

    As I understand testing environment, app doesn't actually connect to market so it shouldn't really matter what store_id I'm using.

    2).How do I approach handling subscriptions? As I understand, I need to get receipt, get all needed info from it (similar to what SubscriptionManager does in iOS/Android) by parsing it. Since SubscriptionManager doesn't work in Windows Store, I need to parse receipt manually. But because I can't get receipt in testing environment, I have no idea how I should parse it and where is all info located. Should I just manually handle it by receiving product success event, without parsing? But it gets harder when I take trials and auto-renewal into consideration.

    3).How do I test subscriptions in market, if app is already published? Basically app is already in store with non-consumable products, and I want to update it with new subscriptions.

    https://docs.unity3d.com/Manual/UnityIAPWindowsConfiguration.html this guide says that if one wants to test how IAP works, they should publish it, then make it invisible to users, make products cost 0.00, test it, and then make it visible again with valid prices. Is there something I'm missing or misunderstanding?

    Because of 2 problems above I need to make a test build, not intentional for users, test it, and then re-submit it once I understand how to handle subscriptions and parse these receipts. But I can't submit test build, because I can't make my app invisible to existing users. And I can't test it before publishing because it just doesn't want to initialize.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Do other products work OK? It sounds like they are, we have heard of other reports of subscription issues on UWP. We haven't had a chance to test yet. You would not want to use the fake store, it does not actually connect to a store as the name implies. Is your product literally named "{product_store_id}" ?
     
  3. Nesit

    Nesit

    Joined:
    Dec 24, 2019
    Posts:
    8
    Others do work okay, initialize properly, etc. It's about subscriptions that don't want to initialize.

    No, I use their valid id, according to the microsoft site (how guide suggests). There are 4 subscriptions for my application right now, and every one is marked as unavailable during initialization. But id shouldn't really matter in fake mode, but I didn't really got to release phase to test it here, because of problems described above.

    Do I understand correctly, that I need to upload app first, to test IAP on "release" mode, not in fake store? Or there are other ways to do it? That's what makes it troublesome.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would follow the same process to test as you did with your other products, there looks to be a possible issue with UWP subscriptions.
     
  5. Nesit

    Nesit

    Joined:
    Dec 24, 2019
    Posts:
    8
    Yeah, I've tried to use correct bundles without fake store and still non-consumables are initialized properly, but subscriptions products are simply unavailable. At start, I get warnings like: "Unavailable product Sub 3m -com.companyname.productname.sub_3m" (product's id here is placeholder, of course, but I verified actual one several times).

    Can I safely say, that subscriptions are currently not supported at current moment?
    Or there is possible workaround?
     
    Last edited: Jan 15, 2020
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No work around yet at this time