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. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hello @Sheyk2022, as recommended multiple times, I would really, really suggest you update to the latest 5.x version for being able to publish to App Stores. You will not be able to release apps with SIS 4.3.7 or lower due to the requirement of Unity IAP 4.4.0+.

    If you've bought SIS on the Unity Asset Store, there is no way to download older versions. I do not distribute the asset via email manually or by other means. If you've bought it on my website, you have access to version control (see all code differences between versions) and also download all older versions down to 4.3.7.
     
  2. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Actually what I wanted to do was update the code itself based on the changelog. but unfortunately I will have to update using version 5. I didn't know that it was only possible to access older versions through your website... Thanks for the answer
     
  3. christokkies

    christokkies

    Joined:
    Apr 8, 2020
    Posts:
    13
    Forgive me if this has already been asked, but are there plans to make this package capable of integration with the Epic Game Store? Or would we need to make our own custom store to integrate with Unity IAP to achieve this? Thanks
     
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    You are actually the first person asking this :) Currently there are no plans to support the EGS due to almost no one being able to profit from it. My last information was that the Epic Games Store is invite only, may I ask if that changed or did they accept your application already?
     
  5. christokkies

    christokkies

    Joined:
    Apr 8, 2020
    Posts:
    13
    They've recently opened it up to more developers, though I don't believe it's as open as Steam. It's quite possible that it's still not worth the effort to modify the plugin to support it.

    Currently, I'm evaluating the work of having your plugin communicate with Epic services through their plugin located here: https://github.com/PlayEveryWare/eos_plugin_for_unity

    The epic plugin allows Epic services (such as authentication and store) to communicate with the developer's own application.

    For us it's more of a curiosity at this point. Again, might not be worth the effort.
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Thank you for the feedback @christianyoder! I took a look at the plugin you linked and it would be possible to implement a custom store for this. However I would need an application on the Epic Store to test this, so if you have no urgency for it, that's currently not planned.
     
  7. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Hi @Baroni thanks for you help, as last time asked, the problem with Android Shop not working was because I didn't activate in app, now everything works and was also Sandbox-Tested, very cool :).

    Got some last questions before I release:
    1.) Do I always need a Restore Purchases Button? As I'm using Playfab as my Serverbackend, all items are synched there. But yeah, the user could definitely lose all of his Purchases, if he'd lose his account, his account gets hacked or E-Mail changed somehow, so I think that I'd need to. That's why I've integrated it already, but when pressing it, nothing happens, also no Debug-Messages? Or is that fine, since there's no items to restore. How could I check that? If I understood it right, the user could just make a new Account and press the Restore-Button to have his items in this new account, or am I wrong with that? That way users could make multiple accounts and just share their info with friends. So again: Do I really need that restore purchases Button?

    What does exactly happen, when a user activates this, for money users buy coins, are the items bought with coins then also restored?

    2.) What happens, if a user buys a Coins-Pack for real money and buys items with it - and then wants revenue or his money back for the Coins-Pack he bought. Does SIS also consider this, and if yes, how does SIS know, that Skin X,Y was bought with those coins?

    As always, thanks for your kind help mate!
     
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    On Apple, yes - Apple could reject your app if you don't have one. On Google Play its optional since the user's purchases are with his/her PlayFab account anyway. Note that the "Restore Purchases" button is for the products, not the user's account. There are other ways to restore an PlayFab account but this happens outside of Simple IAP System.

    Obviously nothing happens if the user does not have any purchases associated with his/her account. Although difficult, you would be able to test this with a purchase on the user's device that exists locally but has not been sent to PlayFab yet. Pressing the restore button should then send the receipt to PlayFab. This is nothing that would occur in a production app though since it would mean that the user made the purchase in a version without PlayFab and then you added PlayFab later.

    Users can only restore products they already own, or just unlocked. They send a list of products to PlayFab which they have retrieved from PlayFab during login earlier (so the same products), or additional products they unlocked during the session for free. This makes sure that although unlikely, users can continue to use their purchases in the event of unpredicted exceptions or major functional failure in the inventory workflow of your app (i.e. your app code accidentally deleting all DBManager inventory after login).

    As explained above, due to the user sending only current purchases it is not possible to associate them with other accounts. Also, if they would send the original Unity IAP receipts again, PlayFab would decline them as duplicate.

    The "Restore Purchases" button does not restore consumable products (which would then e.g. grant coins again), but everything else in the user's inventory.

    Simple IAP System retrieves inventory from PlayFab. SIS is not aware of something that happens outside your app on the App Store (a refund), eventually while the app is not even running, as the App Store does not communicate this without using server notifications. Instead, PlayFab could use these notifications, but they do not. If you are talking about Google Play, a user can only make one refund per app, so the potential of misuse is limited. If this is something that concerns you, you would check the refunded transactions in your Google Play orders list, then go into PlayFab and subtract coins / remove an item from the corresponding user.
     
  9. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
  10. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Thanks for the notice. Images are hosted externally, and the image hoster seems to be offline since 17 hours. I will monitor its availability during the day.
     
    Gushmeister likes this.
  11. Zyonia

    Zyonia

    Joined:
    Feb 1, 2023
    Posts:
    1
    Hello, I am creating a VR version of my e-commerce website. I sell glass bottles and pretend to sell them in the VR environment. Do you know if this asset will allow my customers to buy (pay) the website's products on the VR environment? Thanks
     
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hello @Zyonia, thank you for posting here. If you are running your e-commerce website in a VR browser already, you would actually not need any Unity asset like this one, or Unity at all. You could just create a PayPal link to your product and embed that on your website, which would then open a new page and direct the user to PayPal. The behavior would not differ between desktop and VR.

    If you have developed a Unity application which renders your website in-app, or built a completely new application (without any browser), it gets a bit more difficult. To lay down the facts, App Stores do not allow selling physical goods with their native payment systems. So, using e.g. Google Play (+Pay) or the Apple App Store for that is not allowed. You definitely have to use PayPal (supported by this asset) or any other external payment provider yourself.

    Currently, when using PayPal with this asset, a new page is opened directing the user to PayPal as explained above. Actually I have not tested this workflow and what happens in VR, since it has not been asked before. If you are considering buying this asset, could you elaborate more on the desired behavior: Unity application + browser (external browser asset?), Unity application and in-game shop (without browser), and what VR environment (device?). Thanks!
     
  13. ProfitMoses

    ProfitMoses

    Joined:
    Sep 23, 2019
    Posts:
    2
    Does this work with PC games? More specifically, a web game?
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    The asset itself, yes. It depends on what store or billing provider you want to use.
    • PC: Steam, Oculus, PayPal (with or without PlayFab for user inventory)
    • Web: PayPal (with or without PlayFab for user inventory but highly recommended)
    The note on "with or without PlayFab" means that if you decide to use PayPal, you have to decide where to store the player's purchases, as PayPal is only a billing provider, not a user cloud storage. The integration with PlayFab would handle that and avoids you having to set up a database and player authentification on your own.
     
  15. ProfitMoses

    ProfitMoses

    Joined:
    Sep 23, 2019
    Posts:
    2
    When I click on a button, it says "Billing is not available" or "Not enough currency"

    Is there a step by step guide that I may follow?
     
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
  17. Benjaben22

    Benjaben22

    Joined:
    Oct 26, 2012
    Posts:
    75
    For some reason Unity analytics doesn't report any of the revenue when people buy things. Not sure if it's an issue with Steam/PlayFab. But just thought I'd check to see if that's a known issue.
     
  18. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @Benjaben22 Since Steam is a custom store that does not ship with Unity IAP, Unity IAP cannot report revenue to Unity Analytics. Doing this manually would result in client ownership of reported revenue, so your best alternative is to look into the analytics on PlayFab instead.
     
  19. Benjaben22

    Benjaben22

    Joined:
    Oct 26, 2012
    Posts:
    75
    @Baroni Good to know! I wish the PlayFab analytic tools were as good as Unity's haha!
     
  20. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    @Baroni
    Hi there! New Unity IAP was released.
    Many callbacks have been added. Are you thinking about implementing them?
     
  21. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @justtime! The Unity IAP changelog is longer than the actual required or noteworthy changes though. Specifically, there are no "new" callbacks - the old ones have been extended with an error message. I did implement them already (I have to, otherwise the interface throws errors) and will release the update early next week.
     
    makaka-org and justtime like this.
  22. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Hey, I just got the package and I'm trying to implement purchases for Steam.
    Followed the steps in the guide. Used the example json file so the default products would work.
    Built the project with only "01 Buttons" scene, saved the project into the correct folder inside steamapp, when I launch the game I see the overlay, but when I press the buy button nothing happens.
    Checking the log, it seems to be breaking at "SteamStore.Purchase" any idea of what might be happening?
    This is an existing steam project with live builds, dunno if this changes anything...

    This is the error I get:

    NullReferenceException: Object reference not set to an instance of an object.
    at SIS.SteamStore.Purchase (UnityEngine.Purchasing.ProductDefinition product, System.String developerPayload) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Purchasing.PurchasingManager.InitiatePurchase (UnityEngine.Purchasing.Product product) [0x00000] in <00000000000000000000000000000000>:0
    at SIS.IAPManager.Purchase (System.String productID) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <00000000000000000000000000000000>:0
    UnityEngine.Logger:LogException(Exception, Object)
    UnityEngine.Debug:LogException(Exception)
    UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
    UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
    UnityEngine.EventSystems.StandaloneInputModule:Process()
    UnityEngine.EventSystems.EventSystem:Update()


    Edit 1:
    After adding a lot of logs in the Purchase method, I can see the reason why: "steamStartPurchaseResult" is null is there anything I can do to fix it?

    Edit 2:
    Adding a null-propagating operator to the "Unregister" method call fixed it. Is this needed for some reason? Since I skipped the method.
     
    Last edited: Feb 23, 2023
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Thanks for the report @mbast, and glad that you fixed it already. The "steamStartPurchaseResult" callback was introduced in the last update and is actually just there for debugging purposes, so not required for the purchase process on Steam. I'll add a fix to the next update as well, thanks again.
     
  24. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    No problem, as I understand you can just keep it and just call the "Unregister" method the second time around, the problem was that the method was being called before the variable was initialized. The null-propagating operator did the trick for me, but might not be the most elegant solution.

    I just have one quick question, I already have unity purchasing implemented for mac/ios/android will there be a problem if I use your library for steam only, is there something that might cause a conflict with both implementations? I really don't want to rewrite the whole purchasing logic on mobile to use your library instead.
     
  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    It depends a bit how you implemented it in your project: if you have separate scenes or projects for each platform, you would simply not add the IAPManager prefab to your (e.g. shop) scene. If you use the same scenes for all platforms and the IAPManager is in all of them, you might want to deactivate its use of Unity IAP by going to Project Settings > Player and removing the "SIS_IAP" define for a specific platform (e.g. Android or iOS).

    Since Steam can run on Mac too and is included in the Standalone platform, you could want to add a custom check and disable "Auto Initialize" on the IAPManager there. Otherwise, when the IAPManager is not initialized, Simple IAP System will do nothing.
     
  26. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Hmm, the remove "SIS_IAP" might do the trick, didn't think about that. Thank you :D

    Although, I just tried to build with both enabled and it works as expected on android. But better be safe and remove the "SIS_IAP" definition anyway.
     
    Baroni likes this.
  27. Madrize

    Madrize

    Joined:
    May 23, 2016
    Posts:
    5
    Hey, I am getting the following error on a testflight build;

    > IAPManager: Trying to purchase product for real money with Unity IAP disabled. Nothing will happen.

    any idea what could be the reason for this ?

    Edit: It seems "SIS_IAP" is not available, not sure what i need to do to add it back
     
  28. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi there, open the Project Settings > Simple IAP System and enable the Unity IAP checkbox.
     
    Madrize likes this.
  29. Madrize

    Madrize

    Joined:
    May 23, 2016
    Posts:
    5
    Thanks!
     

    Attached Files:

  30. UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    Joined:
    Sep 30, 2016
    Posts:
    3
    Hi Baroni. Just purchased this yesterday and I can't seem to clear the local storage data. I've tried clearing multiple times, restarting unity, etc. but I just can't seem to get it to work. Any help would be greatly appreciated. Thanks! Screenshot 2023-03-08 181159.png
     
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi, what happens when you press the Clear button, any errors? Are you on a Mac or Windows PC? Did you specify a price for your "Dice Tower" product - else it will be granted automatically when you run the game.
     
  32. UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    Joined:
    Sep 30, 2016
    Posts:
    3
    Thanks for the quick reply Baroni. No errors. Upon clicking "clear" I just get the attached pop-up, and when I click clear on that nothing happens, errors or otherwise. I click refresh but nothing happens.

    And yes, I've placed a price on the product as shown in the other attachment.

    I'm developing for both windows and mac, but am currently just trying things on my windows machine. Screenshot 2023-03-08 183129.png Screenshot 2023-03-08 183416.png
     
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Very weird. What the code does is just calling PlayerPrefs.DeleteAll. You could call this yourself in an Awake method as a workaround, for example. Alternatively, you could open the Registry, find the entry and delete it (see here for the location).

    If you try to delete it within the Registry, please let me know what content is shown there. I am curious why the code does nothing though. Could you also let me know what Unity version you are running? Will try to reproduce this on my end.
     
  34. UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    UDN_47f0ae7a-927d-4468-8735-75a209ea5b7f

    Joined:
    Sep 30, 2016
    Posts:
    3
    I think that's a good compromise. Will just call it myself then.

    Not quite sure what's going on myself as well. I tried looking at the registry as you said, but having never modified anything in registry before, I couldn't quite figure it out. Will let you know if I do.

    Thanks again for the quick reply!
     
  35. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Hey Baroni, thanks for the support. I have a quick question, is there a way to fetch the price in the user currency on Steam? (BRL in Brazil, EUR in Euro-zone, etc)
    Or do I need to manually implement that somehow?
     
  36. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    After Installing unity purchasing and service core, the project linked successfully but when I tried to follow the next step ( To tick Enable Integration) then I wasn't able to check mark it. Please help Capture.PNG
     
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @mbast, Simple IAP System does not fetch item prices on Steam by default, since that requires doing two additional requests. This might not be something every user needs, so I kept it separate. The local currency price is displayed when initiating the purchase only, in the Steam popup.

    If you would like to know the local currency price beforehand, you would have to do a call to RequestPrices, and then GetItemPrice on the SteamInventory API as described here:
    https://partner.steamgames.com/doc/api/ISteamInventory#RequestPrices

    @Shivaji_Games Thanks for reporting this, I am aware of this issue but have not been able to reproduce yet. Could you please let me know what Unity version you are running? As a workaround, you would want to try clicking on the "Enable Integration" text or next to the checkbox so it gets highlighted in blue (selected) and then pressing Enter on your keyboard.
     
  38. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @all Looking for games which integrate Simple IAP System for showcase screenshots and/or a quick video for my trailer! Video will be splitted into 7 seconds of gameplay, 3 seconds shop. Game name and platform will be mentioned.

    There is no work for you, just send me a link to your published game, please :)
     
  39. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    @Baroni I am using Unity 2021.2.19f1. Thank you It's working now after following what you said (pressing enter after clicking on text).
     
    Last edited: Mar 12, 2023
  40. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Thank you for pointing out the correct API method to look for, I spent many hours looking into the wrong place. It was way easier than I expected. SteamInventory.RequestPrices and SteamInventory.GeItemPrice was all I needed.

    I'd recommend having this as an option in future updates, it can be confusing for the end user if they see a different currency when they initiate the checkout.

    I even got a message from the Steam review team pointing that out:
    Caution: The currency shown in-game doesn't display prices in the user's own currency. For example, an item is shown in-game to cost $1.99, but when clicking to buy this item, it actually costs 2.69 Canadian dollars. It looks like you do make a currency conversion, so this isn't a major problem. However, we recommend setting up the game to display prices in the user's own currency. You can use the ISteamMicroTxn/GetUserInfo API to display the user's currency, and display your prices accordingly
     
    Last edited: Mar 12, 2023
    Baroni likes this.
  41. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    The difficulty for this is having to consider all the different currency codes, where some of them should be displayed before the price ($1.99) and some of them after (1.99€). Will have to investigate how to handle it within SIS correctly for all cases - thanks for the feedback!
     
  42. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    I honestly haven't thought about the position, I just put the symbol before the number. But after reading your message I did a little research and this is what I found, which may help you:

    System.Globalization.NumberFormatInfo.CurrencyPositive
    Is a number from 0 to 3, being:

    0 = $n ($1.99)
    1 = n$ (1.99$)
    2 = $ n ($ 1.99)
    3 = n $ (1.99 $)

    https://learn.microsoft.com/en-us/d...tion.numberformatinfo.currencypositivepattern



    Code (CSharp):
    1. public static CultureInfo GetCultureInfoFromCurrencyCode(string currencyCode) {
    2.     CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
    3.    
    4.     foreach (CultureInfo cultureInfo in cultures) {
    5.         RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID);
    6.  
    7.         if (regionInfo.ISOCurrencySymbol == currencyCode)
    8.             return cultureInfo;
    9.     }
    10.  
    11.     return CultureInfo.InvariantCulture;
    12. }
    13.  
    14. public static string GetCurrencySymbolFromCultureInfo(CultureInfo cultureInfo) {
    15.     if (cultureInfo == CultureInfo.InvariantCulture) return string.Empty;
    16.  
    17.     RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID);
    18.  
    19.     return regionInfo.CurrencySymbol;
    20. }
    21.  
    22. public static string GetPriceString(string currencyCode, ulong value) {
    23.     CultureInfo cultureInfo = GetCultureInfoFromCurrencyCode(currencyCode);
    24.     string symbol = GetCurrencySymbolFromCultureInfo(cultureInfo);
    25.     string valueString = value.ToString().PadLeft(3, '0');
    26.     string parsedString = valueString.Insert(valueString.Length - 2, cultureInfo.NumberFormat.NumberDecimalSeparator);
    27.     int currencyPattern = cultureInfo.NumberFormat.CurrencyPositivePattern;
    28.     string priceString = parsedString;
    29.  
    30.     switch (currencyPattern) {
    31.         case 0:
    32.         priceString = $"{symbol}{parsedString}";
    33.         break;
    34.  
    35.         case 1:
    36.         priceString = $"{parsedString}{symbol}";
    37.         break;
    38.  
    39.         case 2:
    40.         priceString = $"{symbol} {parsedString}";
    41.         break;
    42.  
    43.         case 3:
    44.         priceString = $"{parsedString} {symbol}";
    45.         break;
    46.     }
    47.  
    48.     return priceString;  
    49. }
    upload_2023-3-14_12-38-37.png


    upload_2023-3-14_12-39-29.png

    upload_2023-3-14_12-39-51.png

    upload_2023-3-14_12-40-7.png
     
    Last edited: Mar 14, 2023
    Baroni likes this.
  43. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @mbast awesome, thank you for taking the extra time! Definitely noted as a feature request with that namespace in mind.
     
  44. doganakdag

    doganakdag

    Joined:
    Oct 25, 2019
    Posts:
    14
    Hi,
    As of this morning IGooglePlayStoreExtensions.IsPurchasedProductDeferred(Product p) call inside the HasPendingPurchases() method fires a warning stating "Cannot parse Google receipt for transaction". I debugged and found out that GetPurchaseState method of IGooglePlayStoreExtensions interface can't get the payload out of receipt string.

    Does anyone have any idea what may have gone wrong?
     
  45. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @doganakdag, what SIS and Unity IAP version are you using? Could you post an anonymized receipt string that throws the error?
     
  46. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, I am using Receipt Validator, want to know what should be filled in User ID (Receipt Validator Script) And from where I can get it ? Capture.PNG
     
  47. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hello @Shivaji_Games, thank you for trying out the Receipt Validator. The User ID is an identity of the user that you would assign after the user logged into your app. If you are on the FREE plan or do not have any login in your app, just leave it empty. The Receipt Validator will then generate an internal User ID for transaction tracking purposes.

    If you do have a login (like Google Play Games or Sign In With Apple), you would set the User ID value to the user token you received from your login. For more information, please see the documentation.

    Also, for support requests about the Receipt Validator feel free to use the internal support ticket system, after you logged into the dashboard, in the lower left corner. Thanks!

    Important note: If you are using Simple IAP System in your project, it comes with a component that works with the Receipt Validator service already. To be clear: you do not have to import the Receipt Validator SDK separately! Please see this page for details and the short setup guide.
     
    Last edited: Mar 16, 2023
  48. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
  49. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @justtime Got the forum notification, no changes necessary (but an update will be released later today anyway with other fixes), thanks for the heads up :)
     
    justtime likes this.
  50. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, I want to use receipt server validation, Is putting codes here will be validated from server ? (In-between this marked area) between this.PNG