Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. 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. rubicogames

    rubicogames

    Joined:
    May 10, 2022
    Posts:
    2
    @Baroni Thanks for your suggestions, I was able to fix my issues and everything is ok now. However I have a question about analytics - I see that the package requires Unity Analytics to be enabled, but Unity suggest that we move to the new UGS Analytics. How will this impact the Simple IAP package? I want to implement custom events in my game and currently I'm using Legacy Analytics. Will it be a problem for the Simple IAP package if I switch to UGS Analytics?
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @scottnicholson113 well if you say you are using the correct credentials for sandbox and production (BOTH - they are different!), I am not able to assist further :) I can only suggest looking for additional spaces in your PayPal secrets, maybe there is one at the end you cannot easily see. Otherwise if you have "Development Mode" enabled in the Unity Editor and deploy that, the Unity Editor and WebGL build should both use the same sandbox credentials so theoretically there is no difference.

    @rubicogames Great to hear! Simple IAP System does not use any Unity Analytics functionality by itself, I guess you meant the Unity IAP package? Therefore for Simple IAP System there is no difference what version of Analytics is used in your project.
     
  3. scottnicholson113

    scottnicholson113

    Joined:
    Mar 20, 2020
    Posts:
    6
    Thank you for all your help so far! Where can I find the production credentials? And then where would I put them? In the "Live" Section?
     
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Yes, in the "Live Client ID" and "Live Secret" fields. If you log into developer.paypal.com (where you created your Sandbox credentials), there is a toggle in the top right corner to switch to production. You have to do the same there - create an application and it will then display the Live credentials.
     
  5. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    What did you mean by "authenticated my user with PlayFab+Steam"? I'm currently using the "Playfab" example scene and clicking "Authenticate with device ID" - do you mean I don't have to do that? You are correct, doing this doesn't make Steam-symbol appear on PlayFab site with user login.

    But if I don't do this, I get "Billing not available". Or is there some other way to login - how to login with "Steam+PlayFab"?
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Indeed. I loaded the PlayFab scene and did nothing, it switches to the next scene (in the sample, the vertical example scene) after a few seconds automatically. This is because it automatically tries to connect to PlayFab via your Steam account.

    If it does not, you would want to check the login flow in PlayFabManager.cs and if you do not have the vertical example scene in your build settings, what other scene it is trying to load after authentication. This is done in the UI script in the PlayFab scene.
     
  7. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Ok finally got it to work. The issue was that I had "Validation only" checked. I looked at the PlayFabManager and if Validation only is checked, it doesn't auto login. I was under the impression, that "Validation only" should be checked if I'm only using receipt validation feature? But to be able to initiate Steam+PlayFab purchase, I have to be logged in to PlayFab. But that doesn't happen, if I have "Validation only" checked.

    What is the proper way of doing this? I only want server-side purchase validation from PlayFab+Steam - should I have "Validation only" checked and if yes, should I initiate PlayFab+Steam login manually by calling PlayFabManager?
     
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @herra_lehtiniemi Well we should have discussed this before wasting hours and days of setup and trial and error :D

    Server validation is not needed for Steam. Steam has its own validation and does a pretty good job at fake purchase detection and malicious user behavior already. Adding PlayFab on top of this, if you are not using any other PlayFab features, does not provide any additional benefit.

    As such, "Validation Only" in combination with Steam is not verified for this use case. Therefore you can get rid of PlayFab entirely and just use the native Steam implementation via Steam Inventory. There is a separate guide on the SIS docs for this.
     
  9. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Oh dear. Indeed. I was constantly under the impression that a 3rd party server is required for proper Steam purchase validation and that direct Steam purchases would be easily faked. I'm really grateful for your support on this and not all of it was wasted.

    I was wondering if anyone knows if there's a free price tier for Steam item purchases for debug-purchases? Can I somehow "purchase" the items to test post-purchase actions in my app or do I have to pay money to see what happens after a completed purchase?
     
  10. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    In Steam sandbox mode (in a game that is not published yet) all purchases do not cost real money. If the game is already published, unfortunately there is no way for sandbox purchases anymore. See this post:
    https://forum.unity.com/threads/sim...sis-shop-solution.194975/page-41#post-8883426
     
  11. eagleknight42

    eagleknight42

    Joined:
    Oct 23, 2021
    Posts:
    26
    EDIT: Mate I THINK IT WORKS ON INTERNAL BUILD. HOW? HOW UNITYS OFFICAL PACKAGE DOESNT WORK BUT YOURS DOES? I'LL RELEASE THE GAME SOON. IF IT WORKS ILL IMMEDIATELY GIVE 5 STARS AND GIVE A BIG DONATION, AND CONTINIUNG DONATION SUPPORT. IVE BEEN WORKING WITH THIS FOR 3 DAYS AND NEAR 40 HOURS...

    Hello, I couldnt configure Codeless IAP so I bought the package.
    Now Im getting Billing is not available.
    I uploaded the game on internal channel from google play store. I just uploadded the test scene from the asset. What might be the problem? I only put 1 product and added that key from google play store.

    Edit: Okay I fixed it by entering license key to unity dashboard.
    Now I get:
     

    Attached Files:

    Last edited: Apr 9, 2023
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @rocketshader Glad to hear you're making faster progress than with Unity IAP alone - that was the main intention when creating the asset, to save you those 40+ hours :)

    Entering the Google Play license key is actually not required, this is only used by Unity IAP for analytics purposes. Simple IAP System does not use it in any way. Your internal build might be working now because it can take up to 24 hours for Google to make the test track available and that time has passed.

    I have not seen this error before. Are you using any other plugins that could cause this? Googling does not yield many results, but some of them suggested:
    - updating the Google Play app / Google Play services on the device
    - it seems that the com.google.android.finsky activity which causes the error is used by Google for signing applications. Check that you granted all permissions to your app in the launch popup (or uninstall, redeploy and grant permissions again)
     
  13. eagleknight42

    eagleknight42

    Joined:
    Oct 23, 2021
    Posts:
    26
    Could be something else. Now I seen another problem. I had to turn back from 2022.2 to 2021.3.22f1 and got an error like on the photo. I changed to just UnityWebRequest.Post for now but I'd like to know why it happened and will it be a problem. Im not using paypal tho



     

    Attached Files:

  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @rocketshader In the code lines from your screenshot I am doing a UnityWebRequest.Post already, not UnityWebRequest.PostWwwForm. PostWwwForm is only available in Unity 2022.2 and above. Maybe you accepted a Unity code upgrade popup in Unity 2022.2 and it switched out the methods automatically? Therefore when downgrading, this method is not available anymore.

    Since UnityWebRequest.Post would be the correct (default) method, it is fine to revert back.
     
  15. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Is there a way to make Unity app fetch current currency from server (Steam or Playfab) so that I would have my consumable purchases available on all devices? Which workflow would enable this behavior? Or are they always device-specific (added to DBManager after purchase)?
     
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    By "current currency" you mean an amount of currency in the user's inventory, earned in-game or purchased via IAP? Because of security reasons, the current implementation of Steam Inventory (native) only supports retrieving non-consumable purchases across devices. Saving any consumable products like currency is only persisted locally (via DBManager).

    If you would like to use cross-platform functionality and persist everything, you would have to use the Steam & PlayFab integration (without the Validation-Only checkbox ;)), which sends every purchase to PlayFab servers, completely managing all user inventories. The PlayFab guide makes that clear by stating: "If you're using the full suite of PlayFab in Simple IAP System, this means that no data is saved on the device". And that is true - as you have tried in the past already, you would be logging into PlayFab using the Steam account to retrieve the current user's inventory every time on app launch. As you can see, the requirement of persisting consumable purchases would change the implementation quite a bit (> making PlayFab necessary).
     
  17. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Ah, great to hear. :) And to consume currency, does IAPManager.Consume update the currency on the PlayFab-account (instead of using DBManager)?
     
  18. eagleknight42

    eagleknight42

    Joined:
    Oct 23, 2021
    Posts:
    26
    Hello again.
    Im trying to get the list of products in my category but im not succeding. I couldnt see the category dropdown like you have on Horizontal Example Scene, I wrote the same code in IAPContainer.cs

    Code (CSharp):
    1.         [HideInInspector, SerializeReference]
    2.         public IAPCategory category;
    but it didnt show on editor. I dont want to enter reference id by hand. How can I do this? Ill assign the data manually. If not logical I'll use IAPContainer.cs of course.

    BTW what should I to do assing real localized price that is pulled from play store?
    Code (CSharp):
    1.    IAPProduct product = GetIAPProduct(p.definition.id);
    I seen something like this. Should I do like this?

    THanks
     

    Attached Files:

  19. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Absolutely! Calling IAPManager.Consume synchronizes with the user's inventory on PlayFab.

    Well, HideInInspector means that the variable does not show up in the inspector. However, the IAPContainer also has an additional IAPContainerEditor script that is responsible for fetching categories from the IAP Settings and populate it for selection in the dropdown. Could you explain what you are trying to achieve?

    In combination with your question above, I think you are over-complicating things. If you enable "Fetch" in the IAP Settings for your product and either use an IAPContainer with shop prefabs or placed a ShopItem2D for that product in the scene manually, the text on its buy button will automatically display localized values (also: title and description).

    If you want to manually read out the localized price, that comes from Unity IAP, so you can do that by accessing IAPManager.controller.products.WithID("your productID").metadata.localizedPriceString.
     
  20. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    I'm trying to consume currency like this and update the changes to PlayFab. But for some reason this doesn't update the currency on PlayFab server:

    Code (CSharp):
    1. DBManager.ConsumeCurrency("coins", 1);
    2. PlayFabManager.SetFunds();

    Should I do something extra in addition to this?
     
  21. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Did you read the documentation guide regarding "in game synchronization" and "adding cloud scripts" chapters?

    I assume you missed the Cloud Script part.
     
  22. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Ah, thanks. I did indeed. Thank you so much. Ah, so I can use IAPManager.Consume on currency as well? Great! And the "productId" for currency is the one I have defined (like "coins")?

    Just to recap - I have to implement the cloud scripts to be able to decrease user currency on PlayFab servers? Or should IAPManager.Consume work on currency without cloud scripts or is it just for products?
     
    Last edited: Apr 12, 2023
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    IAPManager.Consume is only for products, not currency, as that does a product exchange in the user's inventory. It is designed e.g. for temporary speed / XP boosts that the player can activate at any time.

    DBManager.ConsumeCurrency and PlayFabManager.SetFunds should be used if you are only manipulating the user's currency (locally), without any other product interaction (like a purchase) and then want to update the cloud save. Since PlayFab updates the user's currency on product purchases automatically but does not without, you have to add the Cloud Scripts for that purpose.
     
  24. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hello, quick question about handling Online & Offline.

    I'm planing to use Playfab integration but want to also give players possibility to play the game offline (I'm aware of cheating possibilities, will probably disable virtual currency gains / purchases offline).

    Would it be possible to store SIS data locally if the player is not logged in, and write to Playfab if/when he is ?
     
  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Hi @DevNoody , when in "Offline" mode i.e. not logged in with PlayFab you should disable "Memory Only" on the DBManager.

    You will have to figure out what key-value pairs to synchronize then manually though, because when logging in with PlayFab at a later point, all local progress will be lost. Maybe you would want to use a different identifier in the DBManager for offline and online, so they are not overriding or replacing each other.
     
  26. eagleknight42

    eagleknight42

    Joined:
    Oct 23, 2021
    Posts:
    26
    Hello, Im using IAPContainer, but my prices is not updating on UnityEditor and Im getting IAP is not initialized right in my build.
    And when I click the buttons only product id: "money2" is logged. but I have 4 different buttons for 4 different money packs.
    Only Real Price is showing true.
    Thanks for all the help! We are getting theeeereeeeee

    Edit: I have uploaded to internal testing and it works but like I said only shows "money2" as available product, but I checked every IAP item and their IDs are correcto in Unity.

    iapreferences.png iapreferences2.png iapreferences3.png
     
    Last edited: Apr 14, 2023
  27. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Hi @rocketshader , thanks for the screenshots!

    The Unity Editor does not have a connection to Google Play or your internal build, therefore it should only be used for basic testing. If you want to test whether the IAPs work, you have to deploy to your Android device.

    As mentioned since the Unity Editor does run completely local, your other products should definitely invoke the "HandleSuccessfulPurchase" method too. In the Unity Editor the IAP workflow basically just passes through. When running your scene in the editor, on the ShopItem2D component for each item, did you check that the "Product ID" is correct (and different) on these items? I hope you did not set the "Product ID" value on the item prefab.

    The only way to figure out whether the issue with Google Play or with Unity, is to scroll over the device log when your application launches. You will several messages from Unity IAP in the log, one of them mentioning something like "Receiving products..." and then if Unity IAP cannot find your product, a message with "product ID x not found". If you see that message, it means the problem is with Google Play. Double check that your IAPs are active in the Google Play developer dashboard. For help on debugging, see this last section in the Google Play guide.

    Hope we can solve this together very soon :)
     
  28. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    When usein Steam+PlayFab-integration, what is the recommended way of giving out free in-game-currency?

    I remember you meantioning that the "steam ticket" used to identify users on the PlayFab account a constant factor tied to player Steam account, correct?

    If so, can I expose this user id in the game so that if we want to give the player more in-game currency, we can request the user to provide us this "steam ticket"? Is the ticket value secret or can we just print out the value from PlayFabManager.userId?
     
  29. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    The user auth ticket from Steam is a session token with a maximum length of 1024, so potentially much longer than the player ID on PlayFab and can change from time to time (for the same user). Therefore, you would want to display PlayFabManager.userId instead. Additionally, you cannot really search for a Steam session ticket on the PlayFab dashboard.
     
  30. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Ah, sorry I confused terms. So basically I would display userId and that's what shows on the PlayFab console as well and is searchable?
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @herra_lehtiniemi Yes, exactly. The userId is the player ID that is displayed in PlayFab under the players tab, and when clicking on a player you can modify their inventory directly (eg to add coins).
     
  32. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Are you adding Unity Cloud Save and Economy integration?
    And does this plugin work in Meta Quest app lab?
     
  33. OkeanixTR

    OkeanixTR

    Joined:
    Jan 28, 2017
    Posts:
    46
    Hi, Subscriptions are not working as intended. For example I buy a Tier 1 Subscription for a month (the test duration is 5 minutes in Android), however, Tier 1 stays in Playfab and the user keeps Tier 1 even though the subscription is expired.
     
  34. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Maybe, at some point. Until recently Unity Economy did not even have a way to delete users, and as far as I am aware, still cannot display or modify inventory on individual users. Therefore being so low on features compared to PlayFab, not supporting a minimum set of workable functionality, it is unlikely that I will spend many hours and days on an integration in its current state.

    The Oculus integration makes use of the Oculus Platform SDK. I am unfamiliar with the Meta Quest app lab, however based on its documentation it seems to use the same SDK, so it might work with it (not tested).

    PlayFab does not provide full support for subscriptions yet, please see this recent thread. They basically only validate a subscription receipt once and then forget about it. If you do not have to rely on PlayFab, you could use my server side validation service instead.
     
  35. OkeanixTR

    OkeanixTR

    Joined:
    Jan 28, 2017
    Posts:
    46
    I don't think that's really a good excuse for not implementing any system about this. You could easily implement some system like deleting subscription products from the user's inventory if no subscription is active, since there is already a system like Restoring Subscription Status in Google Play and App Store.

    It seems you want to sell us your custom service instead adding a simple solution.
     
    Last edited: Apr 24, 2023
  36. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    @OkeanixTR Not sure what you mean, I will definitely not try to fix up a third party SDK. Without PlayFab, subscriptions are working as intended, i.e. how Unity IAP thinks they should work, and the functionality for removing owned products without receipts is already there. Adding cloud scripts or other HTTP calls into PlayFab for checking valid subscriptions on their servers in user inventory is not something I am responsible for.
     
  37. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Thank you for the reply!

    Quick follow-up, is it possible to dynamically set the cost of an item in the catalog ?

    For example, I would like to implement a fast travel feature which VC cost will be determined by the distance to travel. Is that possible to implement or should I just look into azure functions directly setting the VC amount to deduce?
     
  38. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Question: How should I handle a situation where the user buys some currency using Steam IAP but the game crashes before being able to add the currency to unity economy?
     
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Good question! For virtual products that only exist in Simple IAP System, this is of course possible, since you can easily modify the local IAPSettings file directly whenever and wherever you need it. When using PlayFab, the local price need to match the server price, so this effectively means you would need to modify the server from the client (I assume that is not an option), or have a "dynamic cost" product, where the client<>server cost validation does not happen. You will want to check on the PlayFab forums if this is supported.

    You are not able to, because you are thinking about this the wrong way, and in fact, a lot of developers do the same. Having the client send some "give me coins" request to a server should never be done. With that approach, you are giving your game away to cheaters on a golden plate. To fully handle a scenario like this, first Unity Economy would need to support Steam IAPs. Then your client would send a purchase request to Unity Economy, which contacts Steam, handles the purchase (server-server) and returns the result back to the client. Even after the client crashes after the request was sent out, the purchase would still be persisted.

    PlayFab does support Steam. As you know, Unity Economy does not. So ignoring the cheater issue and if you are going to use Unity Economy anyway, you would potentially need to provide manual support to these users upon request.
     
  40. jonathanurosa

    jonathanurosa

    Joined:
    Sep 24, 2018
    Posts:
    14
    I need help. I can't get Unity IAP - paypal to work in webgl as it works for me in the editor. It gives me this error: Unity IAP is not initialized correctly! Please check your billing settings. page: https://jonathanurosa.github.io/webglJavascript/
     
  41. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    431
    Hi there! Does current version compatible with IAP 4.8.0?
     
  42. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    What Simple IAP System version are you using? In an earlier version, there was a difference between Sandbox/Production environment being used depending on editor runtime and whether "Development Build" was enabled in Unity. The latest version is consistent and only considers the "Development Build" checkbox. Did you update and enabled that checkbox, so it uses the Sandbox environment in both the Unity editor and build?

    Hey! As long as Unity IAP does not break backwards compatibility, Simple IAP System will always be compatible with newest versions without update. Using 4.8.0 you will see a deprecation message that will be removed with the next update.
     
  43. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    @Baroni
    Hey, I'm back again with Playfab-Authentication and inApp-Purchases.

    Just for my understanding, cuz I'm not sure if I did get right how the whole process works:
    The sandbox-purchases worked out good (I'm in development build), but what I don't understand is, how the "restore" process works. Maybe I just understood it wrong and should do it different. But maybe also my whole system is set wrong.

    I thought I would do it as follows: Player buys in game-currency for real money, and then buys skins with that money. Buying in game-currency isn't used for anything else then for skins. Now how is that handled? Shouldn't it be normally as follows: Player with Appstore Account abc@icloud.com downloads my game, and inside the game he registers (on my PlayFab-server) with another e-mail address then the App Store-account, lets say cde@gmail.com (I'm using your receipt-validation for PlayFab!) He then signs into my game and buys 1000 coins for real money. After buying 1000 coins, he buys a Skin with that money, that he can use. As long as he doesn't log out, everything's fine. Now the user with abc@icloud.com deletes my game and reinstals it. As he has made an account in my game with cde@gmail.com, he just signs in with that.

    After clicking "Restore Purchases", shouldn't he be able to see the skins that he has bought with coins? In my case, when logging back in with a sandbox-user (abc@icloud.com, in my game logging in with playfab cde@gmail.com) and using your "Restore Purchases"-Button, nothing happens, I don't even see the coins that were left after getting skins from that money. The sandbox-user doesn't have the granted the Skin, that I have bought with in game-coins (which have been bought with real money) -> What am I doing wrong? When pressing the Restore-Purchases Button exactly nothing happens, it asks me to log-in, but neither bought (and not spent) coins, nor skins, that were bought with coins were restored. When clicking restore again, asks me for my sandbox-account data again.

    Also, when trying to buy 1000 coins two times, it says: Item has already been bought. I want the user to be able to buy coins more then one time. In the Appstore-Settings the coins are put in as consumables.

    If that's the wrong approach I'm doing, it's fine. Would it be better for me to have every skin being purchased for an amount of x money, and then it will work will the restore purchases???

    Would you maybe find time to talk about that tomorrow via screen-sharing? We can arrange a compensation for the time you are giving me. I'm afraid I can't solve this alone.

    I have to add, that I'm using all this with sandbox-accounts. Could it be, that on a real account (when app is online) everything would be restored right? Like keeping things how they are (buying coins to unlock skins -> unlocked skins available after restoring...). Or should I change to make every Skin directly buyable, and not with coins. The good thing about coins it, that users can get Skins for "less" money when buying a bigger package, that's the reason why I'm doing It that way. But if the only way to restore Purchases is to not have coins and instead just skins for a fixed amount of money, it would be ok. I just want to get things running...

    Additional info: The message from SIS "Your purchases have been restored..." shows up after clicking the restore-button. But I don't have any of the things I've bought. Besides coins I have a Battle Pass that is buyable, and that one is bought with real money (not with coins). So both, consumable and non-consumable items are not restored... After clicking the restore-button and trying to buy something that I've already bought, it shows up, that I have already bought it and it will be restored. But it isn't restored, maybe somewhere in the background, but I can't use it.

    Additional info2: After clicking restore and buying a bigger coin-package, I am able to buy the same skin again with the new coins, what shouldn't be able. So it seems like everything is mixed up somehow... I really need help on that as fast as possible... :(

    Additional info3: I noticed that fetching the coin-prices with playfab is wrong on my device. Inside the unity-editor it shows the coin-prices as I've changed them serverside on playfab the right way. The prices from SIS and playfab differ, because as you said in your doc for playfab that I can change prices there instead of having to upload a new client for everything always... And this works good in editor. But on my phone I only have the prices set from SIS, and when trying to buy one of these it say Error: 1053,WrongPrice. The price on my device is 1000, in playfab I've set it to 1500, and in editor it also shows 1500. But on my device it's wrong...
     
    Last edited: May 1, 2023
  44. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    The last post has been answered privately.
     
  45. ewagstaff

    ewagstaff

    Joined:
    Apr 21, 2017
    Posts:
    13
    Hello! Just purchased, excited to use this for in-app purchases through Steam. However as soon as I import SimpleIAPSystem, I get this error before anything can load:

    Assets/SimpleIAPSystem/Scripts/IAPManager.cs(57,36): error CS0066: 'IAPManager.initializeSucceededEvent': event must be of a delegate type
    Assets/SimpleIAPSystem/Scripts/IAPManager.cs(97,36): error CS0066: 'IAPManager.restoreTransactionsStartedEvent': event must be of a delegate type
    Assets/SimpleIAPSystem/Scripts/IAPManager.cs(107,36): error CS0066: 'IAPManager.receiptValidationInitializeEvent': event must be of a delegate type
    Assets/SimpleIAPSystem/Scripts/IAPManager.cs(116,38): error CS0066: 'IAPManager.remoteInitializeReadyEvent': event must be of a delegate type
    Assets/SimpleIAPSystem/Scripts/IAPManager.cs(118,38): error CS0066: 'IAPManager.remoteFetchProductsEvent': event must be of a delegate type


    I've looked in the FAQ and a few pages of this thread for an answer, but I haven't seen anything similar. I'm on Unity 2021.1.12f1. Anything I can try?
     
  46. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Hi @ewagstaff, thanks for your purchase and writing here! I have not seen these errors before, they do not even seem related to Unity IAP but coming from SIS itself.

    Do you by any chance have an "Action" class in your project, not using your own namespace, thus interfering with the built in System.Action type?
     
  47. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    854
    If I understand correctly, this, as any other IAP system, should handle Android/iOS.
    Does it also provide a way to abstract away other vendors (for example, custom vendors for WebGL, Windows/Linux/Mac, but also maybe Amazon store for Android)?
     
  48. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,291
    Hi, you would want to look at this screenshot from the Unity Asset Store page:
    https://assetstorev1-prd-cdn.unity3...hot/347b04af-5ee6-48a0-8857-2a4faf092647.webp

    When it comes to platforms, it is mostly not a question on what type of billing is supported on that platform, but the other way around - Oculus and Steam run on VR/desktop, PayPal can be used on desktop and WebGL. Amazon Store is supported natively by Unity IAP.
     
    xucian likes this.
  49. ewagstaff

    ewagstaff

    Joined:
    Apr 21, 2017
    Posts:
    13
    Wow thank you for the quick diagnosis! That was definitely it. Will keep working on the implementation.
     
  50. Foxxman

    Foxxman

    Joined:
    Feb 21, 2023
    Posts:
    22
    Hi, I have an existing shop system but haven’t got an IAP system. That’s why I planned to buy your asset and integrate it into the existing one. Your asset works perfectly but independently as the amount added are not added to the existing coin database.

    Do you know how to integrate your IAP into mine? And add amount to the existing figures?