Search Unity

Simple In-App Purchase System (SIS) - Shop solution

Discussion in 'Assets and Asset Store' started by Baroni, Aug 8, 2013.

?

Which billing plugin are you using in combination with Simple IAP System?

  1. Unity IAP

    173 vote(s)
    86.5%
  2. Voxel Busters

    10 vote(s)
    5.0%
  3. Stans Assets

    13 vote(s)
    6.5%
  4. Prime31

    4 vote(s)
    2.0%
  1. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024

    Also, the warning is here: "
    Problem detected while importing the Prefab file: 'Assets/SimpleIAPSystem/Prefabs/VR/MainCamera.prefab'.
    The file might be corrupt or have missing nested Prefabs. See details below.
    Warnings: Component at index 2 could not be loaded when loading game object 'MainCamera'. Removing it."

    And link of VR section in docs is broken: https://unity3d.com/de/learn/tutorials/topics/virtual-reality
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @makaka-org The warning is fixed in the update as well. Thanks for the hint on the Unity docs, did not notice that it moved somewhere else.
     
  3. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    I noticed that dataUpdateEvent is fired thrice (or twice in some cases), when purchase virtual product for coins from Vertical2D scene.

    Is it a bug?

    1 stack

    dataUpdateEvent
    UnityEngine.MonoBehaviour:print (object)
    SIS.IAPListener:TestX (string) (at Assets/SimpleIAPSystem/Scripts/IAPListener.cs:31)
    SIS.DBManager:Save (string) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:723)
    SIS.DBManager:AddCurrency (string,int) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:419)
    SIS.DBManager:ConsumeCurrency (string,int) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:429)
    SIS.DBManager:purchaseVirtual (SIS.IAPProduct) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:489)
    SIS.IAPManager:purchase (string) (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:426)
    SIS.ShopItem2D:purchase () (at Assets/SimpleIAPSystem/Scripts/ShopItem2D.cs:347)
    UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)

    2 stack

    dataUpdateEvent
    UnityEngine.MonoBehaviour:print (object)
    SIS.IAPListener:TestX (string) (at Assets/SimpleIAPSystem/Scripts/IAPListener.cs:31)
    SIS.DBManager:Save (string) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:723)
    SIS.DBManager:purchaseVirtual (SIS.IAPProduct) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:509)
    SIS.IAPManager:purchase (string) (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:426)
    SIS.ShopItem2D:purchase () (at Assets/SimpleIAPSystem/Scripts/ShopItem2D.cs:347)
    UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)


    3 stack

    dataUpdateEvent
    UnityEngine.MonoBehaviour:print (object)
    SIS.IAPListener:TestX (string) (at Assets/SimpleIAPSystem/Scripts/IAPListener.cs:31)
    SIS.DBManager:Save (string) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:723)
    SIS.DBManager:AddPurchase (string,int) (at Assets/SimpleIAPSystem/Scripts/DBManager.cs:270)
    SIS.IAPManager:CompletePurchase (string,bool) (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:527)
    SIS.IAPManager:purchase (string) (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:427)
    SIS.ShopItem2D:purchase () (at Assets/SimpleIAPSystem/Scripts/ShopItem2D.cs:347)
    UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)

    P.S. I just added handler TestX in IAPListener:

    Code (CSharp):
    1. void Start()
    2.         {
    3.             IAPManager.purchaseSucceededEvent += HandleSuccessfulPurchase;
    4.             IAPManager.purchaseFailedEvent += HandleFailedPurchase;
    5.             IAPManager.consumeSucceededEvent += HandleSuccessfulConsume;
    6.             IAPManager.consumeFailedEvent += HandleFailedConsume;
    7.             DBManager.itemSelectedEvent += HandleSelectedItem;
    8.             DBManager.itemDeselectedEvent += HandleDeselectedItem;
    9.  
    10.             DBManager.dataUpdateEvent += TestX;
    11.         }
    12.  
    13.         private void TestX(string s)
    14.         {
    15.             print("dataUpdateEvent");
    16.         }
     
    Last edited: Jul 11, 2022
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    This is not a bug, since the DBManager indeed modifies data for each operation: virtual currency add/reduction, product inventory modification and transaction complete. As the methods used by the DBManager can also be called manually outside the regular purchase flow, it fires the event for each call.

    This will not be an issue regarding performance unless users buy hundreds of products per second, or you grant currency during core gameplay. For the latter, it is always advised to cache earned currency amounts and grant them at the end of the game round / in time intervals, to avoid any PlayerPref storage calls.
     
  5. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    public static event Action<bool> restoreTransactionsFinishedEvent;

    when bool state is false, then there is nothing to restore or there is a fail with restoration flow?
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    The scripting reference says: "fired when a restore transactions workflow completes, delivering its state", meaning that it will return false with an error, and true otherwise (also when there is nothing to restore).
     
    makaka-org likes this.
  7. chris_bluebirdstudios

    chris_bluebirdstudios

    Joined:
    Jan 9, 2021
    Posts:
    2
    Hi just wanted to say that this is a really great asset and has streamlined our team's work so well!

    I just would like help with one thing, and that's the issue where the IAPSettings.asset file is continually changing and being put as a newly-changed item to check-in with PlasticSCM.

    One thing that happens is that when we are adding a new product or editing a product in the Project Settings, we'll see that the asset gets completely wiped and all of our products get deleted. And then, we'd have to go PlasticSCM and revert that change - which is an annoyance.

    Any help on this would be appreciated!
     

    Attached Files:

  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @chris_bluebirdstudios, thanks for the kind words!

    I was able to reproduce and fix the reverting settings issue for the next update. As the next update is, again, a big update breaking some things, I will upload a fixes-only version to my website (since the Asset Store does not support downloading multiple versions).

    I'm hard working on the update and plan to release it next week!
     
  9. chris_bluebirdstudios

    chris_bluebirdstudios

    Joined:
    Jan 9, 2021
    Posts:
    2
    Awesome! Looking forward to this update!
     
  10. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    Does the plugin support Unity Game Services? I found it in changelog of Unity IAP 4.2.0

    ### Added
    - Feature to automatically initialize **Unity Gaming Services** through the catalog UI. Please see the [documentation](https://docs.unity3d.com/Packages/c...al/UnityIAPInitializeUnityGamingServices.html) for more details.

    ### Changed
    - The In-App Purchasing package now requires **Unity Gaming Services** to have been initialized before it can be used.
    For the time being **IAP** will continue working as usual, but will log a warning if **Unity Gaming Services** has not been initialized.
    In future releases of this package, initializing **Unity Gaming Services** will be mandatory. Please see the [documentation](https://docs.unity3d.com/Packages/c...al/UnityIAPInitializeUnityGamingServices.html) for more details.
     
  11. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @makaka-org The initialization of Unity Gaming Services (which is required in the latest Unity IAP 4.x versions) will be included in the update going live this week.
     
    makaka-org likes this.
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    A big update has been released! You can already download it if you've purchased from my website, or wait until early next week and download from the Unity Asset Store. Version 5.1.2 without all the breaking changes and only the latest fixes can be downloaded from my website as well, since the Unity Asset Store does not allow downloading other versions. Changelog below.

    Why is Simple IAP System getting cheaper?
    With more and more developers joining my Server-Side Receipt Validation Service, I am able to cover a part of the expenses for asset development and support for this asset. That's why I am happy to give something back to you (new customers)! If more people are using the validation service, eventually we will even reach the point of making Simple IAP System free for everyone :)

    v5.2.0 (link to release note page)

    THIS VERSION IS NOT BACKWARDS COMPATIBLE
    • added and changed all example scenes to showcase one specific feature at a time
    • added new purchase workflow using a separate confirmation window (see upgrade notes)
    • added 'askToBuy' checkbox on the ShopItem2D component to enable the new purchase confirmation workflow
    • added Unity Gaming Services initialization due to Unity IAP requiring it and otherwise throwing a warning
    • added restoreTransactionsFinishedEvent handler to the IAPListener script, showing a message on restore success/failure
    • added ReceiptValidatorClient also re-validating purchase receipts on restore
    • changed the visual design of all example scenes, shop item prefabs and textures
    • changed extension packaging (VR & PlayFab scripts) to separate packages, available to import from the Project Settings' Setup tab
    • changed PlayFab scripts dependencies to require Unity IAP and removed PLAYFAB define. Meaning PlayFab cannot be used without billing anymore. If you wish to use PlayFab without any billing functionality or on certain platforms only, please use your own PlayFab manager script
    • changed PlayFab cloud scripts from legacy to (new) Azure functions. See updated PlayFab guide for instructions
    • changed IAPManager's RestoreTransactions method to also work for Google Play without or with local or server receipt validation
    • renamed UIShopFeedback 'errorWindow' variable to 'messageWindow': reassign your 'Window - Message' reference in your shop scene
    • renamed PlayFab scripts: ReceiptValidatorService > PlayFabReceiptValidator, UIButtonCoupon > PlayFabUICoupon, UILogin > PlayFabUILogin
    • removed Unity IAP build platform selection in Setup tab. You can still disable Unity IAP on certain platforms by removing the SIS_IAP define in Player Settings manually
    • removed PlayFab Facebook support since Facebook WebGL apps and Gameroom were shut down
    • removed Xsolla support due to imposed sanctions and its removal from the Unity Asset Store
    • fixed category billing provider override not taking product billing provider override into account
    • fixed Project Settings ScriptableObject sometimes losing its data on script recompilation
    • fixed ReceiptValidatorServer script requiring Unity IAP namespace even if deactivated
    • Unity IAP compatibility updated to 4.2.1+
    UPGRADE NOTES
    • Because some scripts have been renamed, the Simple IAP System > Scripts folder should be deleted before updating to this version. Do not delete or overwrite the IAPListener script (if you modified it) and the IAPSettings asset to keep your changes
    • The previous Vertical/Horizontal example scenes have been replaced. If you have been using those in your app, recheck them regarding graphics and references and ensure they still work as desired
    • Make sure that your project is linked to the Unity Gaming Services backend (Project Settings > Services tab) since Unity IAP now requires it
    • As the ShopItem2D's 'buyTrigger' variable was removed, you'll have to remove the button from your self-created shop item prefabs too.
    • Place the 'Window - Purchase' prefab into your shop scene to make use of the new purchase confirmation workflow. Assign a reference of it to the UIShopFeedback component.
    • Reassign missing references of the UIShopFeedback component in your shop scene, e.g. a reference from the 'Window - Message' prefab to the 'messageWindow' variable
    • If you are using your own 'Window - Message' prefab, you have to attach the new UIWindowMessage component to it and assign corresponding references first
    • If you have been using PlayFab or VR before, import the separate extension package from the Project Settings' Setup tab. Check the new scenes provided
    • If you are using PlayFab, update the PlayFab SDK to at least 2.130.x in order to support the new Azure cloud script requests
     
    makaka-org likes this.
  13. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    What about decreasing both prices for plugin and service instead?
    It will allow more people to use your stuff with income diversification.

    Please, clarify for me the using of validation quota & subscription product (I only have a subscription product in my free app).

    Starter pack = 500 validation.
    Does it mean that 500 subscribed people can be in my App without limit during the month?
    Or just 500 validations (active, and expired, and not subscribed)?

    What if I Have 10 000 free users in my app (which see ads to use app) and only 500 subscribers?
    And every app launch I need a validation. How is the quota spent in this case? Only 500 runs of app for all user types?
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    While the asset price is a one-time fixed amount I can easily calculate, the service has usage-based recurring costs not only for the subscribers, but also for me paying the servers the code runs on. The smaller plans are already cheaper than what you would pay for your own virtual machine, without storage, validation code and support. I am monitoring the usage of subscribers in case there are opportunities in this regard.

    One validation is consumed for a new or recurring subscription. This means that with the Starter plan, you can have 500 active subscribers per billing month. Validating expired or fake receipts does not reduce the limit, nor validating the same receipt multiple times.

    On app launch you would make a call to the servers for getting the user's inventory, instead of validating their receipts again. Free users would receive an empty inventory as a response. For subscribers the request would return the subscription product. There is no cost for accessing the user's inventory, so the quota remains the same.
     
    makaka-org likes this.
  15. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    makaka-org likes this.
  16. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    I spent a while researching Steam microtransactions, but the APIs I found had the usual fatal flaw: Patchy documentation with no active support. $20 for a long-established and well-supported package is very reasonable, especially since this should save me time with iOS and Android down the road. Cheers.
     
    Baroni likes this.
  17. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    Hi, Do I need to follow this your Guideline if my shop is not built on your demo scene?

    "Place the 'Window - Purchase' prefab into your shop scene to make use of the new purchase confirmation workflow. Assign a reference of it to the UIShopFeedback component."

    So my scene only uses IAPManager prefab,
    and NOT: "UIShopFeedback", "Window - Message" prefab, ShopItem2D and so on.
     
  18. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    I am not using PlayFab, but after deleting previous version and importing 5.2, I get:
    • Assets/SimpleIAPSystem/Scripts/SISPurchasingModule.cs(53,16): error CS0103: The name 'PlayFabManager' does not exist in the current context
    • Assets/SimpleIAPSystem/Scripts/SISPurchasingModule.cs(58,25): error CS0246: The type or namespace name 'PlayFabStore' could not be found (are you missing a using directive or an assembly reference?)
     
  19. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    If you don't use ShopItem2D prefabs and directly call IAPManager.Purchase somewhere in your code instead, then no, the Purchase confirmation window is not triggered in that case.

    Thanks, going to check that tomorrow and will report back.
     
    makaka-org likes this.
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @makaka-org Thanks again for posting the errors, my mistake for not deleting the PlayFab files in my project. To fix them, please create an empty class named PlayFabManager.cs like this that actually does nothing inside:

    Code (csharp):
    1. using UnityEngine;
    2.  
    3. namespace SIS
    4. {
    5.     /// <summary>
    6.     /// Empty class and does nothing (when not using PlayFab).
    7.     /// Only present to initialize Unity IAP correctly.
    8.     /// </summary>
    9.     public class PlayFabManager : MonoBehaviour
    10.     {
    11.         /// <summary>
    12.         /// Returns nothing.
    13.         /// </summary>
    14.         public static PlayFabManager GetInstance()
    15.         {
    16.             return null;
    17.         }
    18.     }
    19.  
    20.  
    21.     public class PlayFabStore : MonoBehaviour
    22.     {
    23.     }
    24. }
    The issue was caused by deleting the PLAYFAB define in version 5.2. I guess having the above empty template class is cleaner than trying to re-add the PLAYFAB define somewhere. I'll send an update to the Asset Store with this asap.
     
    makaka-org likes this.
  21. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
  22. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    Hello. I have two main questions:

    1) Under Prerequisites on the Steam Store page, it includes setting up PlayFab (Full Suite). Is this no longer the case, and if not, are there any advantages to using PlayFab if I'm not interested in their cloud saves, analytics, etc.? Is PlayFab necessary for increased security, and can I replace that layer of security with your Receipt Validation package?

    2) I'm at the point in testing where in Unity's console, I get the warning "No products available for purchase!" I've tried uploading all three JSON exports to Item Definitions in Steamworks, but I get the following error:

    Untitled.png

    I tried following along with your video guide, but the Item Definitions are already added and the JSON file name appears to be in German. I followed all other steps, including with PlayFab, although I removed everything in Project Settings except for Category 00, coins, and coins_small. Should I also post the JSON files?
     
    Last edited: Aug 1, 2022
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hey @BrianCrandell,

    A separate guide for Steam (native) and PlayFab+Steam is on my to-do list. You do not need to use PlayFab and can just ignore all parts in the guide and video about it. If you use Steam native, you are making use of Steam Inventory - there is a note in the video about it, i.e. a checkbox you have to enable on Steamworks.

    Not really any advantage, no. And the Receipt Validation service on my website only supports iOS and Android, not Steam, as they do receipt validation before granting purchases already (since the purchase basically happens outside the game in an overlay).

    The JSONs from SIS are not the correct ones to upload. How the product JSON should look like is described on the official docs, here on this page. For example, it could be:
    Code (csharp):
    1. {
    2.   "appid": "xxxYOURAPPIDxxx",
    3.   "items": [
    4.   {
    5.   "itemdefid": "100",
    6.   "type": "item",
    7.   "name": "Item 1",
    8.   "price": "1;VLV500",
    9.   "description": "My Item 1"
    10.   },
    11.   {
    12.   "itemdefid": "200",
    13.   "type": "item",
    14.   "name": "Item 2",
    15.   "price": "1;VLV1000",
    16.   "description": "My Item 2"
    17.   }
    18. ]}
     
    crandellbr likes this.
  24. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    You have a typo in docs of Playfab: "For this reason, ‘Auto Initialize’ and ‘Memory Only’ are disabled on the IAPManager and DBManager respectively." Memory Only flag is enabled on screenshot.

    Also, the link here is broken: "See the PlayFab integration guide for more details."
     
  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @makaka-org You really read the PDF very thoroughly :D

    Screenshot is correct and the link should be this one.
     
    makaka-org likes this.
  26. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    I managed to get Steamworks to accept Item Definitions, but I'm having trouble now on the SIS end. The sample scenes don't load text for descriptions, prices, popups, etc. I tried following the basic setup video with an empty project, but I get the same results. Importing Unity IAP after SIS results in compile errors tracing back to the Library, which can be resolved by deleting the Library so that it rebuilds. This is running Unity 2020.3.37 LTS with the latest version of Unity IAP (screenshots included).
     

    Attached Files:

  27. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @BrianCrandell You definitely don't want to delete or import Unity IAP after SIS as long as you make use of it by enabling it in Project Settings > Simple IAP System. If the errors even show up without enabling that checkbox, then Unity f* something up.

    It's midnight here so my PC is already turned off, but I have a very simple Steam scene (actually not making use of SIS at all) I can send you tomorrow, so that you can check if the Steam connection works to begin with. You can already see if there are issues if you cannot open the Steam Overlay, it displays the wrong app name, or you are not able to call any other Steamworks functions besides IAP.
     
  28. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    Yeah, Unity screwed something up. I tried to import Unity IAP first, and I get the same cascade of errors before SIS is even in the project. Not too surprising, but I think something funky is still going on here. The example scenes fail to display properly no matter how I try to get SIS and Unity IAP into the same project. I'd like to get these scenes working so if something goes wrong later, I know to focus on Steam and not SIS. At the same time, I'd appreciate receiving that Steam scene so I can test that end.
     
  29. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Just a random thought, did you try to remove the services.core package or update to the latest versions manually in the Package Manager (should be Unity IAP 4.4.0, services.core 1.4.2)?

    The text missing from the prefabs could be the Unity UI package missing, but again just a shot in the dark.
     
  30. DevSpur

    DevSpur

    Joined:
    Jul 19, 2014
    Posts:
    20
    Hi, I'm looking to buy this product but I have some questions.

    does this run on ios and android or is it only WebGL?

    How does the process happen, can you change the item's value at runtime?
    And then how does the process look like does it open a web page inside the app or does it open a webpage outside of the app?
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi there, I am curious why you get that impression, like is something confusing in my marketing material which I would need to adjust?

    The asset uses Unity IAP under the hood which by itself supports Android and IOS already. On that foundation, I added more store options like Steam and PayPal.

    You change the pricing of a product in the App Store, at any time. Simple IAP System then receives and displays that price.

    It depends on the store. The native implementation is used whenever possible. So on Android, iOS and Steam you will see the stores purchase popup (see screenshots on the Asset Store page). On PayPal, there is no native functionality inside the app and because of security, it opens a separate browser window for the purchase process where the user needs to sign in with PayPal.
     
  32. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    We're far apart in timezones and I had work today, but thank you for the continued support. This is why I'm here and not messing around with some framework on Github that hasn't been touched in two years.

    I was on the wrong version of In App Purchasing (4.2.1), but 4.4.0 sees the same behavior. I appear to be on 1.4.0 for Services Core. I don't see it in the Package Manager and can't find documentation on how to upgrade. I tried deleting the package, but it's the same version when rebuilt. Unity UI is installed, with only one version offered in the Package Manager.

    I installed Unity 2022.1.11 and tried with In App Purchasing 4.1.5 (the only version offered). I don't get the Library errors, but the text still doesn't load, and I get the following error when Enabling Integration and when playing scenes:

    Code (CSharp):
    1. Objects are trying to be loaded during a domain backup. This is not allowed as it will lead to undefined behaviour!
    I...don't know how to explain this. I fully expected everything to work with a fresh install of the latest version of Unity. I'm not sure what else to try.
     
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @BrianCrandell You are mixing old and new packages: the Services Core package was released with the beta ending late June, integrated and soft-required (it will throw a warning) since Unity IAP 4.3.1, which is also the lowest version required by Simple IAP System 5.2.0.

    I was curious to see all these issues and especially the missing text issue myself, so I tried to reproduce this in a new project in Unity 2022.1.0. Here are the steps I did:

    1. Starting with only Unity UI in the project
    upload_2022-8-3_8-15-35.png

    2. It is correct that Unity IAP shows only version 4.1.5 to be available, so I install 4.4.0 manually (top left plus button):

    upload_2022-8-3_8-44-33.png

    3. A "Link your Unity project" popup appears, I'm following the instructions by clicking on the Project Settings button as the Services Core package will require it later anyway:

    upload_2022-8-3_8-45-49.png --> upload_2022-8-3_8-47-20.png

    4. The Services Core package was added by Unity IAP with a dependency, however not the latest one. So again, adding 1.4.2 manually:

    upload_2022-8-3_8-49-51.png

    [continued below]
     
  34. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    5. Finally, downloading and importing Simple IAP System 5.2.0 into the project, which leaves us with the following packages and assets in the project:

    upload_2022-8-3_8-52-59.png

    6. Enabling SIS to use Unity IAP in the Project Settings. After forcing Unity to recompile I get the same "Objects are trying to be loaded during a domain backup..." error but that can be ignored for now (there is a full thread for it here, some people are even getting this error with just game object and a Canvas in the scene). No other errors. Up to this step, this is what you would have to do!

    In the sample scenes, I see the same missing text issue and it is because the font is missing on the Text components. I really don't know why the font file has not been included in the exported package, but is in my project!? I will double check with the Asset Store.

    upload_2022-8-3_10-12-46.png

    Side note: whew that was complicated in the latest Unity version... I guess I have to write a guide for this. Additionally, Unity crashed 2 times during the setup.
     
    Last edited: Aug 3, 2022
  35. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    My observation is next. When I am trying to check my project for Missing stuff with Maintainer, then Maintainer freezes (Unity 2021.3.6, 2021.3.7). Freezing started happening when I updated the project to SIS v5.1, v5.2 from v4.

    So only due to this, and only in this my project (which has SIS inside), I can't use Maintainer. I tested about 16 projects during last months. So try to coop with the author of this plugin to understand the issue. He works on this specific task more than 5 years.

    P.S. This is weird because it must show the missing issues instead of freezing.
     
    codestage likes this.
  36. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    Thanks for checking, glad it wasn't just me. I stayed on Unity 2018/2019 as long as possible, avoiding the Package Manager and even Unity Hub because I don't trust Unity to add major new features. Looks like my concerns had merit, but anyway, please update us on the missing font issue when it's resolved.
     
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @BrianCrandell It can now be solved by re-downloading the asset from the Asset Store.
     
    Last edited: Aug 4, 2022
    makaka-org and crandellbr like this.
  38. eNm2

    eNm2

    Joined:
    Oct 28, 2017
    Posts:
    6
    hi Baroni.

    i have a shop where i want to sell items for real money and for virtual currency like Diamonds and Coins also.
    I have created all the Products. Now i can see on the buy button with coins or diamonds only the costs from the product, Is there a way to display the icon for the virtual Currency on the Buy Button?
     
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @eNm2, you would duplicate a shop item prefab (or create a new one) and just place the icon where you want it to be. Then apply your changes to the prefab and assign it to the category.
     
  40. eNm2

    eNm2

    Joined:
    Oct 28, 2017
    Posts:
    6
    thank you, it worked !
     
  41. Protozoaire

    Protozoaire

    Joined:
    Apr 14, 2015
    Posts:
    61
    Hello, I just bought the asset and I have an error in Unity 2020 :

    Assets\SimpleIAPSystem\Scripts\IAPManager.cs(587,157): error CS1061: 'ReceiptValidatorServer' does not contain a definition for 'IsServerValidationSupported' and no accessible extension method 'IsServerValidationSupported' accepting a first argument of type 'ReceiptValidatorServer' could be found (are you missing a using directive or an assembly reference?)
     
  42. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @Protozoaire, thanks for posting here. If you are using server side validation, did you add the RECEIPT_VALIDATION scripting define to the Project Settings > Player > Scripting Define Symbols as well? Otherwise the server validation code is not compiled. This step is necessary to fully enable all methods including the IsServerValidationSupported code, which would not be needed without server validation.

    This can be found in the documentation, here in the first section.
     
  43. Protozoaire

    Protozoaire

    Joined:
    Apr 14, 2015
    Posts:
    61
    Thank you, I've added "RECEIPT_VALIDATION" in the Scripting Define Symbols section and the error is gone :)
     
  44. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,024
    This error occurs after the last step of SIS installation upon Android Target Platform: "If you imported Unity IAP previously, check Enable Integration and press Apply."

    So at this point the user of your asset is not thinking about any validation I guess. User just want to install the asset, and installation manual doesn't have instruction about adding "RECEIPT_VALIDATION" in the Scripting Define Symbols.
     
    Baroni likes this.
  45. danialaddin66

    danialaddin66

    Joined:
    Aug 26, 2019
    Posts:
    7
    Hello! I am currently using your asset for subscriptions in GooglePlay and PayPal (currently more focused on GooglePlay). I have my subscriptions all identified in my GooglePlay Console and I have an optional offer on each, when I fetch them in my app they all fetch properly with their base plan prices, but i can't seem to figure out how to (if possible) to fetch the price of the offer, since I wanted to make it available to either purchase the base plan or the offer.
    I would appreciate your help to know if that is possible, and how! :)
     
  46. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi there and thanks for using SIS! Simple IAP System does not copy the underlying Unity IAP store structures 1-1, but is built on top of them. As such, you would not find subscription offer prices in SIS - however, you can access Unity IAP's StoreController via IAPManager.controller and dive deeper into subscriptions details as shown in this thread, in order to get something like subscription offer periods and prices. Specifically you would look for the getIntroductoryPrice() method.

    Hope this helps - please follow up if it doesn't!
     
    danialaddin66 likes this.
  47. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    Is there any way to detect when the player has cancelled a Steam transaction, closing the purchase window? I'd prefer not to risk the player initiating a purchase while another is pending, so I'd like to lock down the UI while processing. Naturally, there's no reason to do this when canceling. I see SteamStore.OnPurchaseFailed(), but it doesn't seem to be called.
     
  48. dareerahmadmufti

    dareerahmadmufti

    Joined:
    Dec 27, 2016
    Posts:
    3
    Hi, I recently purchased and using your 5.2.0 version of the plugin. I am trying to use PayPal as a payment service for an android game. I have followed the doc and youtube tutorial, but nothing is working out. Even not the PayPal page is opening on request. On app initialization, I am getting these "unavailable products" for the product I have created.
    upload_2022-8-21_12-49-46.png
    Your doc contains only a tutorial about creating the subscription-based product, which I followed, but it also doesn't work.
    upload_2022-8-21_12-58-58.png

    I need to create the consumable type of product, which I am making from this page, not worked.
    upload_2022-8-21_13-0-20.png

    But nothing is working out for me. Also, I tried your example scenes, on one of my created product ids, but they also don't work.
    It would be helpful if you can guide me as the PayPal payment page is not working on my android device.
     
    Last edited: Aug 21, 2022
  49. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @crandellbr, may I ask what kind of processing times on Steam you are seeing, that would require blocking the app? I tested some callbacks and unfortunately, none of them get called when closing the purchase overlay or pressing the "cancel transaction" button. They are only called with the final transaction result. However, during a purchase, the overlay prevents users from doing anything else in the app or initiating other purchases already - that's why I am asking and I did not receive such a request before.

    There could be ways to implement this by making use of the Game Overlay callbacks and checking when it got disabled (here or here), but it would be a bit hacky and also easily circumvented via randomly shift-tabbing.

    ----

    Hi @dareerahmadmufti, regarding your first screenshot (products unavailable), that's not something to worry about. By default Unity IAP tries to initialize the products with Google Play. If it is not able to retrieve information about them, it prints the warning message. Since you are using PayPal for them anyway this can be ignored.

    On your second screenshot, you do not have to add a Store Override for the product. Setting PayPal as the active Billing Provider is enough. The additional "P-...." product identifier is only required for subscriptions to identify them, not for consumables or non-consumables.

    Your third screenshot shows web page html code for users to buy the product, but that is not how Simple IAP System works. Your users are buying the product in your app - with a browser that gets openend when clicking on its "buy" button. The web code is something completely different and can not be used in any connection with Simple IAP System.

    That leaves us with the question, why does the PayPal page not open when you try to buy a product? Did you take a look at the device logs in the moment you try buy it? Is there anything useful printed out in that moment, any log or error?
     
  50. dareerahmadmufti

    dareerahmadmufti

    Joined:
    Dec 27, 2016
    Posts:
    3
    Hi, thanks for your reply.
    No, it is not giving any logs. I am using logcat package on unity, also tried cmd (adb logcat -s Unity). I am trying all things for the past 2 days, but not even the PayPal page is opening by clicking it. I have tried the example scene (01 Buttons) with the subscriptions type and consumable type ids, but it not worked for me.

    *I have tried subscriptions and consumable products both, just subscriptions types so that I am doing something wrong or not (following your website guide https://flobuk.gitlab.io/assets/docs/sis/stores/paypal-native).
    *Second regarding the web page (hitml code) it contains the consumable product code that's why I have commented on it (red lines) and it was only the place where I found to create consumable product on the internet.

    I have tried the unity version 2019 in past (but then read in one post somewhere regarding minimum 2020.x.x required) and now project is on unity 2021.x.x.
    UnityIAP version 4.4.0, Unity UI 1.0.0, services core 1.4.3