Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

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

    178 vote(s)
    86.8%
  2. Voxel Busters

    10 vote(s)
    4.9%
  3. Stans Assets

    13 vote(s)
    6.3%
  4. Prime31

    4 vote(s)
    2.0%
  1. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    @newlife Thanks for the video. I went all the way back to version 5.0.6 and even 4.3.7 on GitHub and nowhere was it required to finish the transaction manually.

    However, I tested on iOS and was able to reproduce this duplicated transaction issue. It's nearly midnight here so I won't dig deeper right now in trying to find out whether this is related to my code, the Unity version or Unity IAP. I'm definitely curious though and will do that in the next days.

    The workaround is, and I already did test that a few minutes ago, to force the ReceiptValidatorClient to finish the transaction immediately. In ReceiptValidatorClient at line 124, insert:
    Code (csharp):
    1. IAPManager.controller.ConfirmPendingPurchase(product[i]);
    I will release an update once I've found the exact cause and version dependency.
     
  2. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,082
    thanks for the accurate analysis. Anyway the workaround you proposed, if I'm not wrong,loses all the benefit all the validation of the receipt.
    I'll wait for the update
     
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    You are indeed wrong. The transaction needs to be finished regardless of whether the validation succeeded or failed, so it is not retried over and over again. But only with a successful validation the product is granted to the user.
     
  4. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,082
    so after this section, right?
    Code (CSharp):
    1.  
    2. //products should contain a receipt on a real device
    3. if (!products[i].hasReceipt)
    4. {
    5.   #if !UNITY_EDITOR
    6.   RemovePurchase(products[i].definition.id);
    7.   #endif
    8.  
    9.   continue;
    10. }
    11.  
    12.  
     
  5. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Yes
     
  6. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,082
    There is a small issue here, it should be
    Code (csharp):
    1. IAPManager.controller.ConfirmPendingPurchase(products[i]);
     
  7. prefix

    prefix

    Joined:
    Sep 26, 2011
    Posts:
    89
    Hi, I'm currently getting "NOT OK" in Package Imported.
    upload_2024-1-23_0-58-1.png

    I have re-downloaded and re-imported the package several times. Re-started Unity Editor as well. With that said,
    Im using:
    Unity version 2022.3.11f1
    Simple IAP system 5.3.0
     
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
  9. prefix

    prefix

    Joined:
    Sep 26, 2011
    Posts:
    89
    Hello! I followed the instructions. When I got to this portion...

    upload_2024-1-23_1-7-35.png

    Is when i realized it says NOT OK. I am unable to change the Standalone to Steam
    Simple IAP System 5.3.0

    Simple IAP System 1 seemed older


    "Wait, sorry I only d/loaded it from the Package Manager. Let me try it from the other way."
    NOTE: Im only selling currency to the user.
     
    Last edited: Jan 23, 2024
  10. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    And... what version of Unity IAP did you import? (asking again)
     
  11. prefix

    prefix

    Joined:
    Sep 26, 2011
    Posts:
    89
    Hmmmm At the moment, I didnt. So im wrong of course :)

    Let me sort through that.. and "IF" i still have issues... i'll ping you.. Thanks for the quick reply!
     
  12. prefix

    prefix

    Joined:
    Sep 26, 2011
    Posts:
    89
    We are in business. Thanks again for the quick reply and the thump on the noggin! Been using your app for quite some time, and ive never had an issue, so i thought that it would be something simple.. like.. i forgot to import it lol.
     
    Baroni likes this.
  13. RockyRaccoon15

    RockyRaccoon15

    Joined:
    Sep 30, 2016
    Posts:
    1
    Hi! I am using your IAP asset for my Steam game. Recently I uploaded my build for Steam review (I am using you Steam integration guide without Playfab) and get this error related to the Sandbox API:

    Review of your build has identified one or more issues. Please read and follow these instructions:

    Failure: Your app has failed our review because the current in-app purchase flow appears to use the sandbox version of the API: https://partner.steamgames.com/doc/webapi/ISteamMicroTxnSandbox Please replace these sandbox calls with the real-money versions of the API. For help with this implementation, please see: https://partner.steamgames.com/doc/features/microtransactions/implementation

    What's strange is I am able to make Sandbox payments when I use my Steam dev account for the build that I uploaded, but when I added my other account to the list of build testers (this account is not dev) I am able to pay with real money.

    How would I go about disabling this Sandbox API for IAP?
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hey there, thanks for posting here! As you have found out by testing using a non-dev account, paying with real-money is already possible, even if the Steam game is not yet released. In fact, Simple IAP System - nor the Steamworks.NET SDK have a "sandbox" flag to enable or disable.

    If your game is not yet released, you can test sandbox purchases with a dev account. If your game is released, sandbox mode will be disabled automatically, even for dev accounts. Several developers have released a game on Steam using Simple IAP System already: please try telling the reviewer to use a non-dev account, or that sandbox mode will be automatically disabled upon release, as per Steam guidelines.
     
  15. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Update released on GitHub: get instant access via GitHub Addon on my website. Unity Asset Store update will be released next week.

    v5.3.1
    - fixed ReceiptValidatorClient not immediately confirming purchase after validation but on next app launch
    This was introduced since Unity IAP 4.2.0 and caused consumables to be granted twice. If you are only
    using the ReceiptValidatorClient (not -Server) and sell consumables in your app, update asap!
    - fixed ReceiptValidatorClient/Server doing a validation attempt twice on restore on IOS
    - fixed ReceiptValidatorServer missing UNITY_STANDALONE_OSX platform define in some cases
    - removed necessity of doing a code change in ReceiptValidatorClient in order to enable its compilation
    - removed ReceiptValidatorClient/Server handler for IAPManager.restoreTransactionsFinishedEvent
    - last version for Unity 2020.3+. Next versions will be released for 2022 LTS and above
     
  16. FSFixer33

    FSFixer33

    Joined:
    May 14, 2018
    Posts:
    15
    Hey, @Baroni
    I use your asset for apple and google store. But when I publish on Windows store, I get messages saying "Unavailable product _product_id_".
    All my products are configured for the app in store and during the build process I've linked app to store.
    I did everything as was written in your and unity documentations.
    Could you please tell me what can it be?
     
  17. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi there! Simple IAP System does not do anything special for the Windows platform - it's just a wrapper for Unity IAP in that regard. I would recommend to test in a new project with only Unity IAP set up. If you receive the same error there, you will want to check your bundle and product identifiers or ask in the Unity IAP forum for potential causes. I'm sorry I cannot be of much help in this case.
     
  18. FSFixer33

    FSFixer33

    Joined:
    May 14, 2018
    Posts:
    15
    Ok, thank you
     
  19. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    Hi,

    I purchased Simple IAP because I had an issue with Codeless IAP, which was refunding purchases within 72 hours due to validation errors. So, I switched to Simple IAP.

    With Codeless IAP, I was able to purchase and remove ads, as well as disable the "Remove Ads" button.

    Now, with Simple IAP, I followed the documentation and checked the scene. Here's what I did:

    1. Added a "Remove Ads" product in Simple IAP/Products, using the same ID as in the Google Play Console. I included the title, description, and price.

    2. Added the "Shop" script item to a GameObject and linked it to my button, choosing "Purchase()".

    3. In the IAP listener, I implemented the following:

    Code (CSharp):
    1.  private void UpdateRemoveAdsButton()
    2. {
    3.      if(DBManager.IsPurchased("com.koukoostudio.marblee.removeads"))
    4.      {
    5.          Debug.LogError("its purchased");
    6.          removeadsbtn.SetActive(false);
    7.      }
    8.  
    9. }
    10. public void HandleSuccessfulPurchase(string productID)
    11. {
    12.      if (IAPManager.isDebug) Debug.Log("IAPListener reports: HandleSuccessfulPurchase: " + productID);
    13.  
    14.      //differ between ids set in the IAP Settings editor
    15.      switch (productID)
    16.      {
    17.          case "com.koukoostudio.marblee.removeads":
    18.  
    19.              removeadsbtn.SetActive(false);
    20.  
    21.              ShowMessage("Ads disabled!");
    22.              break;
    23.          default:
    24.              ShowMessage("Product (" + productID + ") bought!");
    25.              break;
    26.      }
    27. }
    28.  
    29.  
    30. /// <summary>
    31. /// Handle the completion of consumes, be it for consumable or non-consumable products.
    32. /// This is the spot for you to implement your custom game logic for activating in-game products etc.
    33. /// </summary>
    34. public void HandleSuccessfulConsume(string productID)
    35. {
    36.      IAPProduct product = IAPManager.GetIAPProduct(productID);
    37.      if(product != null)
    38.          ShowMessage(product.title + " consumed!");
    39.  
    40.      //section for in game content
    41.      switch(productID)
    42.      {
    43.          case "com.koukoostudio.marblee.removeads":
    44.            removeadsbtn.SetActive(false);
    45.  
    46.              ShowMessage("Ads disabled!");
    47.              break;
    48.      }
    49. }
    I included the case for "com.koukoostudio.marblee.removeads" in both methods, as I was unsure which one was appropriate. I also added a method to disable the purchase button if the product has been purchased, as the "Shop" item 2D Unlock array removed the button even if the purchase hadn't been made.

    Additionally, I included the following code to remove ads:


    Code (CSharp):
    1.  if (!GameManager.Instance.isAdsCoroutineRunning && !DBManager.IsPurchased("com.koukoostudio.marblee.removeads"))
    2. {
    3.      StartCoroutine(GameManager.Instance.ADSTIMER());
    4.      GameManager.Instance.SHOWADS();
    5. }
    This code was functioning correctly with Codeless IAP, using a boolean to turn false when a purchase was made. However, despite seeing the purchase successful message, I'm still receiving ads and the button isn't being removed.

    Code (CSharp):
    1. 2024/02/07 21:47:31.826 32590 32636 Warn Unity onPurchaseFailedEvent(productId:com.koukoostudio.marblee.removeads message: - Google BillingResponseCode = ItemAlreadyOwned)
    2. 2024/02/07 21:47:31.826 32590 32636 Warn Unity UnityEngine.Purchasing.PurchasingManager:OnPurchaseFailed(PurchaseFailureDescription)
    3. 2024/02/07 21:47:31.826 32590 32636 Warn Unity UnityEngine.Purchasing.Extension.UnityUtil:Update()
    4. 2024/02/07 21:47:31.826 32590 32636 Warn Unity
    5. 2024/02/07 21:47:32.114 32590 32590 Debug InsetsController cancelAnimation of types: 3, animType: 1, host: com.Koukoo.Marblee/com.unity3d.player.UnityPlayerActivity, from:android.view.InsetsController.notifyFinished:1727 android.view.InsetsAnimationThreadControlRunner$1.lambda$notifyFinished$0:85 android.view.InsetsAnimationThreadControlRunner$1.$r8$lambda$RAf1SfIREsj9-wH5FOigMy6eLkM:0
    6. 2024/02/07 21:47:34.656 32590 32590 Debug CompatibilityChangeReporter Compat change id reported: 150939131; UID 10321; state: ENABLED
    7.  
    I'm at a loss and would greatly appreciate any help.

    also in LogCat I do See that Failed because I already own but this is only when I test locally while plugging my phone if I do a internal testing I am capable of refund and Try it again but even then ads is not remove and button is not disable.

    Edit: I forgot to mention that I use the latest unity In app purchase with the latest version of your asset. I also use unity 2022.3.15f

    Thank you so much.
     
    Last edited: Feb 8, 2024
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi @Alphamage1212, thank you for posting here. There are several points to your approach:

    First off, you should not add any "remove ads" code to the IAPListener. If you use a ShopItem2D component on your shop item, its buy button is disabled automatically on purchase. Also, it is disabled on app launch, since non-consumable products retrieve their latest state (purchased or not) from the App Store.

    You wrote "removed the button even if the purchase hadn't been made" - but if you have tested this before on the same sandbox account, it was purchased before and therefore the button is disabled? Only deleting the sandbox account (Apple), refunding the transaction (Google) or using a different account would make this product un-purchased again. If you did the refund, open the last sample scene from Simple IAP System and press the "Clear Database" button to wipe out the local DBManager storage (an uninstall and new deployment works too).

    "Additionally, I included the following code to remove ads:"
    Please check whether DBManager.IsPurchased("com.koukoostudio.marblee.removeads") actually returns true after a purchase. If it does not, your product identifier in Simple IAP System might be wrong.
     
  21. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    Hi, Thank you for taking the time to reply to my questioning I did as above but sadly nothing is working.

    What I did :

    I have remove the code in The IAPListener


    Code (CSharp):
    1. public class IAPListener : MonoBehaviour
    2. {
    3.     void Start()
    4.     {
    5.         IAPManager.purchaseSucceededEvent += HandleSuccessfulPurchase;
    6.         IAPManager.purchaseFailedEvent += HandleFailedPurchase;
    7.         IAPManager.consumeSucceededEvent += HandleSuccessfulConsume;
    8.         IAPManager.consumeFailedEvent += HandleFailedConsume;
    9.         IAPManager.restoreTransactionsFinishedEvent += HandleSuccessfulRestore;
    10.         DBManager.itemSelectedEvent += HandleSelectedItem;
    11.         DBManager.itemDeselectedEvent += HandleDeselectedItem;
    12.     }
    13.  
    14.  
    15.     /// <summary>
    16.     /// Handle the completion of purchases, be it for products or virtual currency.
    17.     /// Most of the IAP logic is handled internally already, such as adding products or currency to the inventory.
    18.     /// However, this is the spot for you to implement your custom game logic for instantiating in-game products etc.
    19.     /// </summary>
    20.     ///
    21.  
    22.     public void HandleSuccessfulPurchase(string productID)
    23.     {
    24.         if (IAPManager.isDebug) Debug.Log("IAPListener reports: HandleSuccessfulPurchase: " + productID);
    25.  
    26.         //differ between ids set in the IAP Settings editor
    27.         switch (productID)
    28.         {
    29.             case "com.koukoostudio.marblee.removeads":
    30.                 ShowMessage("Ads disabled!");
    31.                 break;
    32.             default:
    33.                 ShowMessage("Product (" + productID + ") bought!");
    34.                 break;
    35.         }
    36.     }
    37.  
    38.  
    39.     /// <summary>
    40.     /// Handle the completion of consumes, be it for consumable or non-consumable products.
    41.     /// This is the spot for you to implement your custom game logic for activating in-game products etc.
    42.     /// </summary>
    43.     public void HandleSuccessfulConsume(string productID)
    44.     {
    45.         IAPProduct product = IAPManager.GetIAPProduct(productID);
    46.         if(product != null)
    47.             ShowMessage(product.title + " consumed!");
    48.  
    49.         //section for in game content
    50.         switch(productID)
    51.         {
    52.             case "com.koukoostudio.marblee.removeads":
    53.                 ShowMessage("Ads disabled!");
    54.                 break;
    55.         }
    56.     }
    I have also Added a debug button for DBManager.ClearAll();

    I have my ShopItem2D with the button gameObject in the unlock array.

    I have double check my ID





    It is the same Code as in my Google play console.



    I did make a new build and sent it to internal testing. The button is still being remove even if the DBManager.IsPurchased("com.koukoostudio.marblee.removeads"); state it is false.

    And I did clear all at every test and refund, Delete app cache and data also. What Am I missing :(

    Thank you,


    P.s: The last picture is nothing I just can't find it to remove it for some odd reason.
     
  22. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    @Alphamage1212 Thanks for the screenshots. You are mis-using the "Hide On Unlock" selection. Product unlocks are for in-game items that require a specific condition to be unlocked, like "Reach Level 2". Your no-ads product is unlocked. Therefore with your "Hide On Unlock" assignment, you are hiding the Buy button. You can read more about the Requirements feature here.
     
  23. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    Hi, thank you for the reply. I did remove the button from there I do more understand how this feature work.

    I did do another Internal testing with these change with a new Google Account I was able to purchase the IAP but it still state that it is false when purchase is complete. Therefore I still Receive ads and I am still confuse on what I am missing :(


    Edit :


    Code (CSharp):
    1. 2024/02/08 12:01:52.318 29199 30423 Warn Unity Unity IAP: Unable to process purchase with order id: GPA.3337-0152-0973-86769 and purchase token: eeaghcmoaddnifkpcbilcbdk.AO-J1OztorPCfmIbLhERIdLrfh8h4sqBVoTa94P1HSUyCKELAj3OKeIkLvrAzYvoENn-ywEwkp6wpRwkH7SbhInxwchswB_J-A because the product details associated with the purchased products were not found.
    2. 2024/02/08 12:01:52.318 29199 30423 Warn Unity UnityEngine.Purchasing.<IgnoreExceptions>d__1`2:MoveNext()
    3. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Linq.<SelectManyIterator>d__17`2:MoveNext()
    4. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Collections.Generic.List`1:AddEnumerable(IEnumerable`1)
    5. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Linq.Enumerable:ToList(IEnumerable`1)
    6. 2024/02/08 12:01:52.318 29199 30423 Warn Unity UnityEngine.Purchasing.<QueryPurchases>d__3:MoveNext()
    7. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    8. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Runtime.CompilerServices.MoveNextRunner:Run()
    9. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.Tasks.AwaitTaskContinuation:RunOrScheduleAction(Action, Boolean, Task&)
    10. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.Tasks.Task:FinishContinuations()
    11. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.Tasks.Task`1:TrySetResult(TResult)
    12. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.Tasks.Task:FinishContinuations()
    13. 2024/02/08 12:01:52.318 29199 30423 Warn Unity System.Threading.Tasks.Task`1:TrySetResult(TResult)
    14.  
    I do see these error in local testing. The first one is the one that I am the most Confuse about Do you know what could it mean? I think there could be a link between the fact that Removing the ads don't work.

    Thank!
     
    Last edited: Feb 8, 2024
  24. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Unfortunately that goes beyond my possibilities of helping out, since I cannot look into your Google account or device. You are able to purchase the product - so your product ID, bundle ID and general Google settings are set up correctly. If the DBManager is still returning false after the purchase, check that you set the product type in Simple IAP System to Non-Consumable. If the product type is correct, you would need to debug the DBManager method directly.
     
  25. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    430
    Code (CSharp):
    1. last version for Unity 2020.3+. Next versions will be released for 2022 LTS and above
    Hi @Baroni ! What's the point? Isn't 2021 LTS enough?
     
  26. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi, given the fact that 2021 LTS will run out of support in a few months, I would say that no, 2021 is not LTS enough.
    Second: you may know that 2022 LTS will be the last version without that weird runtime fee, so there will a considerable share of people upgrading and staying on that version for many years to come.
    Third: the next version will contain a backwards-breaking change for the PlayFab integration, upgrading Economy V1 to V2. It makes sense to combine that with the release upgrade, rather than doing it in a few months anyway.
    Fourth: Nothing stops you from downloading the asset in Unity 2022 or from GitHub and importing it in 2021. I will keep the scripting defines for < Unity 2022 in the code, but will not support a legacy LTS 3 years later with questions like "why can't I deploy to Android 15" :)
     
    justtime likes this.
  27. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    Hi, I just want to do a follow up on the issue I had maybe someone will face that one day. Turn out I did make a change in the in app purchase in google play console but I did not change the receipt Obfuscator from google to Unity Cloud. Once I did it it work perfectly.

    Thank you for the support.
     
    Baroni likes this.
  28. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    430
    Got it! But I meant is there any technical requirements for minimum 2022? Many assets still support 2019-2020, simply because they don't use new engine or c# features.
     
  29. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    No, there is no technical reason for skipping 2020 or 2021 LTS. It's just that based on Asset Store data, the percentage of users on these versions has got small enough for me to drop their support. As I wrote, you can still import the asset in these versions, but I will upload it using 2022 LTS.
     
    justtime likes this.
  30. DragonCrystal

    DragonCrystal

    Joined:
    May 26, 2021
    Posts:
    2
    Question before purchasing

    I am using a competing API that does not support pending purchases (G..y), currently in Brazil there is a payment method called pix, where the user must pay in an external banking application and then return to the application, i.e. The successful purchase callback does not come immediately.
    Do you offer any support for this type of situation? If that's the case, I'll buy and install it today.
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hello @DragonCrystal, the asset talks to Unity IAP which has interfaces for stores, like Google Play. Google Play is responsible for collecting money from end users, not this asset. So if Google (or Apple) do not support the desired payment method, then it will not be available in this asset either.
     
  32. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    I do have a remove ads IAP button. That work great in close testing and internal testing. I did test it with few other people as well it open up the google purchase window and I am able to purchase it. When I send this working build to google it get rejected with a screenshot that the button does nothing. Nothing is shown. I am a bit clueless on what to do now since it work for me and tester ... One dev on a discord suggest me to remove receipt validation just to see if it will pass so I am waiting for that.

    Any other suggestion. It's a game made with unity and I am using the simple IAP.

    Thank you so much.
     
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi @Alphamage1212, never heard of that before. Did you disable Development Build in that production build uploaded on Google Play? Receipt Validation happens after a purchase is processed, so if the native purchase popup does not even open, that won't be related.
     
  34. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7

    Hi thank you for the reply yes I did, unfortunately it does not seem to work.

    Do you know if there is a difference with a close testing and production ? It's the same build that just get move right?
     
  35. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Yes, absolutely. There is no "Sandbox" toggle or something that needs to be deactivated or anything like that. Like you said, it's the same build that is then released to production.

    If you are not using the latest Unity version, maybe try updating and building a version for Android 14+ specifically for Google to test on.
     
  36. Alphamage1212

    Alphamage1212

    Joined:
    Oct 14, 2021
    Posts:
    7
    Yes i am usong unity 2022.3.15f and latest iap and simple iap package. It's very odd :(
     
  37. AdrianoRegino

    AdrianoRegino

    Joined:
    Mar 9, 2023
    Posts:
    2
    Hi, is there know compatibility with Unity Visual Scripting? If not, there are plans of integrating it? Thank you.
     
  38. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hello, there are no plans for any Visual Scripting support. This asset requires very basic knowledge of C# programming.
     
  39. potatomasterrace

    potatomasterrace

    Joined:
    May 23, 2019
    Posts:
    71
    Is there a way to get it working on older versions of Unity than 2020.3.0 ?

    I'm on 2019.4.30f, and had some difficulties upgrading.

    Or any other alternative solution if not?
     
  40. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Unity 2019 is out of support since 2 years. You will not be able to release any game to Android or iOS with a Unity version older than Unity 2020, because they do not support the newest mobile SDKs. Unity IAP requires at least Unity 2020 too, so no, there is no alternative to upgrading.
     
  41. potatomasterrace

    potatomasterrace

    Joined:
    May 23, 2019
    Posts:
    71
    I'm releasing on steam not mobile fwiw. But sounds like it won't work regardless. Guess I will try again with the upgrade
     
  42. SuperMiro

    SuperMiro

    Joined:
    Nov 23, 2018
    Posts:
    56
    Hi, So I would like to fetch localized price based on the user's country so I can set the custom UI Button pricing to the local currency! Does the GetPriceString(); fetch the localized price or the price I set in the project settings (Simple IAP Settings)
    @Baroni
    Here is what I am mentioning:
    https://flobuk.gitlab.io/assets/docs/unity/sis/api/IAPProduct.html
     
  43. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi! Both. It returns the project settings while offline or when Unity IAP has not been initialized. After that, the localized price.
     
    SuperMiro likes this.
  44. SuperMiro

    SuperMiro

    Joined:
    Nov 23, 2018
    Posts:
    56
    @Baroni After uploading the Game to internal testing path and trying it. The debug log I made for it only shows the USD price not the localized price and not just the USD price its the price I set in the settings and here is the code for it:

    Debug.Log("VIP Price is: "+ IAPManager.GetIAPProduct("vip").GetPriceString());

    Edit: My bad I did not set fetch to true in project settings (Simple IAP Settings)
     
    Last edited: Feb 23, 2024
  45. potatomasterrace

    potatomasterrace

    Joined:
    May 23, 2019
    Posts:
    71
    Is the main advantage of using Playfab for inventory as opposed to Steam Inventory that its platform independent? I wouldn't be doing anything complex, just basic buying of cosmetics like different hats. Planning to launch on Steam first, but if released to xbox or switch later I guess I wouldn't need to redo as much if I go the Playfab route.

    Is one or the other more secure / less prone to cheaters? Or anything else I should be considering?
     
  46. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    PlayFab offers more than Steam when it comes to player and inventory management. On PlayFab you can do custom sales / offers / daily rewards whenever you want to, look into player inventory and modify it easily (e.g. in case of granting refunds or free currency for reporting bugs). It's a platform that allows much more than just tracking inventory.

    If you are only selling non-consumables and do not need to remotely track player currencies (since you do not offer virtual currency), then going the native Steam route would be perfectly fine too. One is not more secure than the other, since both use the same receipts. Steam runs its own fraud detection and prevention system too.

    The current PlayFab implementation in Simple IAP System uses PlayFab Economy V1, which is deprecated. I have the integration for Economy V2 ready for launch, but I am bit hesitant to release it, since it would break the integration for all existing developers. PlayFab did not provide an upgrade path from V1 to V2 so that means you cannot switch easily. I am thinking about releasing V2 as a beta on GitHub first. If you are considering using PlayFab, I would recommend starting with V2 directly, because V1 will get removed sooner or later.
     
  47. potatomasterrace

    potatomasterrace

    Joined:
    May 23, 2019
    Posts:
    71
    Thanks for the detailed reply. It sounds like playfab may be the route to go because of more flexibility overall going forward, but I still have some time to decide. Do you have a timeline for when you may make V2 Beta available?
     
  48. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    806

    and if I already use Unity IAP before and want to change it to this Simple IAP because I want to release a game on Steam and I want it can work with Steam micro-transaction,

    do you have anyway to convert Unity IAP to this Simple IAP ?
     
  49. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    I'll be on vacation next week, so I am planning to upload the beta to GitHub this week, and on the Asset Store after my vacation. Please note that GitHub access is a separate purchase on my website.

    Simple IAP System is built on Unity IAP, but that does not really matter. Integrating Simple IAP System means getting rid of your own IAPManager where you have been initializing Unity IAP, entering your product identifiers in SIS and using the asset's DBManager methods for checking whether a product has been bought or not.
    https://flobuk.gitlab.io/assets/docs/unity/sis/getting-started
     
  50. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,290
    Hi @Rachan, your 1-star review on this asset will not fix your issues with Steam. I do not provide support on Asset Store reviews. Have you read through the Steam guide and followed all points mentioned there? Do you have any specific question about the integration?