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

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    I meant we can save for example in file using Application.persistentDataPath like every Asset Store solution does. It's not a big deal as i understand.
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @justtime understood, thanks for the clarification. Reading the article you linked I could only see data formats for storage, not different storage types. Regarding Application.persistentDataPath, there are a few downsides to it:

    - on Android it requires the "Write External Storage" permission
    - changing the bundle identifier changes the target directory, so previous files are unreadable
    - since files are kept even after uninstalling, if all apps and Asset Store solution would do this, they would slowly pollute the device

    When choosing a save solution, we have to distinguish between files that are related to the device (e.g. photos, music, videos) and files that are connected to the application only (save games), where it would be ok for them to be deleted with the app - I still think PlayerPrefs fulfill that need. It's not that in app purchases are lost in any way - they can always be restored from the App Store. However e.g. for virtual currency, it would be the user's choice for them to be deleted (when uninstalling the app). But again, if restoring them is a critical requirement or you have users playing on several devices, cloud storage would be the best and most secure way.
     
  3. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    The problem of PlayerPrefs is that they get lost all the time, it stated in article and it really happens sometimes. You mentioned that in this case you can restore them form Store, but ii my case(Android) when user lost purchases this feature doesn't work at all. May be this is bug of Unity IAP, may be something else.

    About downsides of file
    1)You should mention this permission in manifest, but it's not necessary to ask a user(like use a mic or location) for saving something in app's system folder. So i don't see any problems here. Most of apps use this permission.
    2)Why do you need to change bundle id? I think it's <1% of use cases.
    3)No, they don't preserve after uninstall because it's an app's system folder, which will be deleted with package. I never seen this in my case.

    In general i agree with state that cloud storage is solution, but i don't use auth in my app...it's seems that i have to if i want to sync purchases.
     
  4. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Another issue is that when user changes device(with the same Google acc) sometimes they can't get purchased items. I think it's a Unity IAP failure but it worth to mention here as well.
     
  5. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    You are basically saying that the restore functionality of Unity IAP does not work at all. If that would be the case, your app should be removed from the store as it violates required terms. I have never heard of this, from any customer using Simple IAP System and the provided "Restore" button showcased in an example scene.

    Of course PlayerPrefs can and will get lost, however the customer really has to mess things up or intentionally clean app cache etc. for this to happen. It does not just magically happen on an app or OS update.
     
  6. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    No, i said it happens "sometimes". Exactly when user reinstall the app(or lost purchases by another cause) and can't get access to purchased items. In THIS case restore feature doesn't work. I have more than 700K installs of my app, so i think it's a representative sample.

    In addition to the official article from Unity, there are many other sources that say that it is preferable to use a file. If you just don't want to do it i'm ok with this.
     
  7. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    I see you have opened a thread in the Unity IAP section regarding this, and I am curious what will be the response. Generally, on Android the ProcessPurchase method of the StoreController is fired again automatically for each product owned by the user after a reinstall - I have tested this multiple times as well (only for non-consumables and subscriptions obviously). However I am watching your thread to learn why that might not work correctly and eventually implement something that could work around this.

    We are both long enough in the game industry and work with Unity, to know that Unity blog articles and things some Unity employees said are sometimes just wrong :D Honestly, it really depends on your use case. I am not able to change the default storage option for all Simple IAP System customers based on your request (first time this comes up in 8 years), but of course I will consider an additional dropdown on the DBManager component that let's you select Application.persistentDataPath, if you prefer to use it.
     
    justtime likes this.
  8. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    I do not particularly believe in solving the problem, because this problem lasts for 3-4 years (but with new versions less often) and not only me, there were similar messages on the forum.

    Thanks for that a lot. It also could be done by introduction of some save/load interfaces or virtual methods to override this behavior by asset user.
     
  9. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Hi @Baroni honestly, not yet, but I promise I will as soon as I'm done testing :) I can't write a review until it is Play-Tested when my game releases :p

    Another question from my side, as I'm integrating Playfab right now: Later on, when I update my shop (add new Skins inside Simple IAP in Unity and so on) - how is the procedure for syncing my new Products with Playfab? Can I just re-upload the JSON again and everything will sync/overwrite on it's own, or how will that work?

    Second Question: In your Playfab Tutorial on the website, I see a screenshot somewhere on the bottom, which is shown in the Chapter "Introducing Sales (Full Suite Mode)", it shows a Screenshot from inside Playfab, where you edit the catalog item "bullet" - you have checked "Is stackable". Do I need to check this also when it comes to my internal currency, that can be bought with real money? My currency is "Pesos", and as I'm interpreting this, if "stackable" would be unchecked, which is by default, I could only buy Pesos once? So do I have to go through all my items now and make sure to have this checked, if the amount of the item can be more then 1?

    Third Question: I've come almost to the end of your Playfab Tutorial Description, even installing NuGet packages worked out for me, I've installed the "PlayFabAllSDK" and the "PlayFabCloudScriptPlugin" Packages inside my Visual Studio Code - Project. But still, on the last "using" - line ( using PlayFab.Samples; ) it shows me an error, that the Namespace isn't present. Do I have to install a third package maybe? That's literally one of the last steps, I'm almost done :/... -> Oh, nevermind on this point, I thought adding the "CS2AFHelperClasses.cs" is just "additional", but it's a must so that your script runs properly. :) Cool, seems like I've made it to the end can't wait to put my hands on this.

    Fourth Question: Okay, I've made it to the end on your Playfab-Tutorial, but what to do now? Does this already work? What else do I need to get Playfab Working, do I need to implement other or more self-written cloud functions, or will everything on Simple IAP now just work, when I buy something in my store? Do I need to add additional code e.g. to get my bought items, or is this done already. My shop and everything worked already fully without Playfab, so on my End, regarding Simple IAP, everything is done inside unity. But it's not really clear to me, I'd need some help to understand on that. Are the "grantItems" and "addCurrency" functions enough, or do I also need a function like "getItems" or something like that, to display my bought items... -> I've tried it in my Development build, and when pressing the buy-button on an Item (Currency, Pesos) just nothing happens and nothing is displayed... I don't know how else to test it.

    Thanks for all your help, I appreciate that!

    Greetings
     
    Last edited: Dec 4, 2022
  10. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    Hi @Gushmeister!

    Yes: for single products you could add them manually in PlayFab prior to release, but if you have multiple ones, you would export the JSON and overwrite your current catalog in PlayFab. You can test this already, simply by uploading the same JSON again and verifying that nothing changed (and previously bought products still exist in user inventory).

    "Is stackable" is meant for products where you can store more than 1 in the user's inventory. Therefore, non-consumable products should have "Is stackable" checked. Currency bundles do not need "Is stackable" enabled, since they are consumed automatically (bundle properties top right: consumed after 5 seconds), so the user will never have multiple of them in his/her inventory. When exporting the JSON Simple IAP System detects bundle products and sets it up like this already. In my sample, "bullets" is an example that can be saved up and consumed later, when the user wants to.

    It should, test it! You can do this directly in the Unity Editor. No other Cloud functions need to be added. Simple IAP System downloads the user's inventory from PlayFab and puts it in the DBManager. From then on, it works like a local inventory, with each additional purchase contacting the PlayFab servers for validation.

    No console logs? Did you log in the user? Was the PlayFabManager prefab placed in the login scene? Do you see any incoming requests in the PlayFab (global) PlayStream monitor, or in the PlayStream section under your logged in user?
     
  11. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    I'll check that back later on when I'm back on my pc :) I didn't know that I can try it in the editor also. But I must say, that I've been using my own Login-Script and not yours, could it be that you are getting Data with the login? Is there any important functions I have to take over into my scripts? :)

    Thanks for your answers!
     
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    The PlayFabUILogin script makes use of PlayFabManager login methods, like LoginWithEmail or LoginWithDevice. These methods then call PlayFabManager.OnLoggedIn with the (successful) login result. This is a static method so when using your own login, you should call it at the end to initialize the user, inventory and purchases with PlayFab.

    Note that the login explicitly requires setting what you would like to receive from PlayFab. There are a few properties required for Simple IAP System to work correctly, please see the PlayFabManager Awake method, "accountParams" variable for this.
     
  13. oturangames

    oturangames

    Joined:
    Aug 21, 2022
    Posts:
    3
    Hello!

    I am getting the following error message in Xcode Debugging if I want to Initialize the IAPManager

    No products available for purchase!

    SIS.IAPManager:OnInitializeFailed(InitializationFailureReason)

    UnityEngine.Purchasing.PurchasingManager:CheckForInitialization()

    UnityEngine.Purchasing.PurchasingManager:OnProductsRetrieved(List`1)

    UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)

    UnityEngine.Purchasing.Extension.UnityUtil:Update()


    I also had to remove following code from the IAPManager class on <<Line 208>> because the system throws an error that the method "SetDeferredPurchaseListener" is unknown. Are you missing directive..."


    "builder.Configure<IGooglePlayConfiguration>().SetDeferredPurchaseListener((Product p) => {OnPurchaseFailed("Purchase of product " + p.metadata.localizedTitle + " is pending.");});"


    After trying my application on the device, clicking on one of the products via IAPManager does not perform any actions
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    Hi @oturangames,


    That message can have multiple causes, telling that the products from the App Store cannot be retrieved and therefore your connection to it is not working. Please see the following section for common causes:
    https://flobuk.gitlab.io/assets/docs/sis/stores/ios-app-store#unsolved-errors

    Accepting the paid applications contract in the agreements section is often forgotten.

    What Unity IAP version are you using? Is it the most recent one, 4.5.1 by following the install instructions?
     
  15. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Hi @Baroni , I don't fully understand this, so I'd like to post code, if that's ok... I'm having a "OnLoginSuccess(LoginResult LIR)" in where I call "PlayFabManager.OnLoggedIn(LIR)", so far so good. But what did you mean with the second part? Should I just call "awake" again in the PlayfabManager, or what did you mean by that.

    I've tried just putting this one line "PlayFabManager.OnLoggedIn(LIR)" and when pressing to buy currency, it works successfully. But when trying to purchase a product then, it says "insufficient funds" - does this mean, it doesn't work?

    "IAPManager reports: PurchaseFailed. Error: Error: 1059, Insufficient funds"

    Ah and when checking the Azure-Portal, it doesn't show that any function from there has been executed.

    Greetings
     
    Last edited: Dec 8, 2022
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    No no, I wrote that the login request requires additional parameters. You can find them on the official docs, for example on the email login (link): GetPlayerCombinedInfoRequestParams (link). The required parameters for Simple IAP System are specified in PlayFabManager's Awake method, in the accountParams variable: GetUserInventory, GetUserVirtualCurrency, GetUserData, UserDataKeys.

    It could mean that the player on the PlayFab dashboard has not enough currency to buy the product (look into the player ID's inventory), or maybe that you didn't fetch it using the parameters above, so it will always be 0.

    You will want to look into the PlayFab dashboard and PlayStream events, not Azure. The two events for Azure only handle granting (free) currency or products. Purchasing products for money or currency is handled directly by PlayFab.
     
  17. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Yeah, I looked it up there also. I'm just calling "PlayFabManager.OnLoggedIn(obj);" at the End of my Login, I think that's right, cuz all the functions u've mentioned are in there? I'm still just testing this in the editor, should I test it on a device with development build turned "on" ?

    In my player inventory on playfab nothing happens, shows 0 granted items, play stream monitor also doesn't show any update... I've activated "fetch" on all products, even on my currency-bundles. I'm just not sure, if I'm really stuck, or if everything works xD But it's funny that when buying currency-bundles the money inside the game fills, but then when wanting to buy something, it says insufficient funds. Could this maybe have something to do with Euro/Dollars???
     
  18. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Gushmeister I think what you are experiencing is the test mode for real money items. Buying something in the editor is not granting items since there is no actual payment / receipt. If the login works correctly, you should definitely test on a real device using sandbox testers.

    However, if you have any virtual products to buy for virtual currency, you could also add some currency to the player inventory in the PlayFab dashboard manually and then try to purchase the virtual product. This will also work in the editor.
     
  19. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Yeah okay understood, so that was my question, if I can test this at all in editor :) What do you think, could I consider this working then? Was calling "PlayFabManager.OnLoggedIn(obj);" at the end of my (successful) login right?
     
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Gushmeister not sure what you mean by working? As I wrote, you can test the login and virtual purchases in the editor (after adding currency to the player manually), which then substracts currency and grants the product from PlayFab and you will see that in the dashboard. You can then verify that this part is working correctly.

    Afterwards you should test with sandbox testers on a physical device and do the full workflow - login, real money (test) purchase from the App Store and virtual product purchase. Check the events in the PlayFab dashboard for each step for the expected outcome.

    Calling the PlayFabManager.OnLoggedIn method at the end of your login flow is the correct way!
     
  21. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Okay perfect, understood :) I just didn't know, that the whole "Full Suite" process was made for virtual stuff only, I don't have any virtual stuff, or to call it different, I'm handling the virtual (free) stuff on my own already with playfab xD I just then don't understand what the Full Suite is for, or to just call it simple: Would it have been just enough to just "not" activate "Receipt Validation" and use the Login-Stuff, and that's it? If I want to handle the products playfab-side to activate/deactivate things in the shop from there, to make my shop more "variable" and interesting
     
  22. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    It is not, that's why I mentioned "real money purchases" in my last two posts too:

    Please see this section of the documentation for an explanation on how the "Full Suite" works, what it does and how it is synced with PlayFab.

    It seems there is some confusion around what PlayFab actually does here. As written in the documentation linked above, "Full Suite" synchronizes the real money (and virtual product, if you have any) purchases with the user's inventory on PlayFab. Nothing exists locally on the user's end device. The user logs in using credentials to retrieve the inventory with owned products and virtual currency from PlayFab.

    By default with "Validation Only", if the user is not signed in already, the login method is just called at the time a real money purchase happens to create a new PlayFab user and validate the purchase. It has no other purpose here - PlayFab is unaware of any virtual currency amounts or virtual products, so the user can still cheat to unlock them locally.

    It seems it depends on what you're actually after - I didn't know that you do not have any virtual products to purchase for virtual currency, but I thought you offer a currency bundle? So what would be the currency for then? If you're handling "virtual stuff" as you call it yourself, or with custom code in PlayFab, that's basically impossible for me to provide support or guidance for.
     
    Gushmeister likes this.
  23. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Oh cool, now I understand this with the Full-Suite, I thought, for having a Shop with just Payed-Items sold, I have also to do all those steps after with Azure Functions and Visual Code Studio. If I knew, I am running Full Suite already without this, I would have been a cool hint at this point xD.

    Still, I'm amazed by your asset, this is so easily adjustable. I'm having a Battle Pass integrated for it with your Asset, and I just want to say "THANK YOU" :) Your asset has accompanied me now with making my own game for 5 years. And every time I had a question, you have answered it fast. After all this time, your asset should have much more attention. It is so easily adjustable, if you want to invest those "5 days" to look trough your code and understand. But if you want to do this, which is what I am doing now, and try to adjust things on how you did, it is so easily adjustable to do everything with it. The system is completely open, and this saved me so so much time really. I'm just happy for using your System in my game. Review was written ;-)

    Greetings
     
    Last edited: Dec 10, 2022
    Baroni likes this.
  24. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Gushmeister agreed, the PlayFab integration section could need a bit of restructuring to explain the difference between "Validation Only" on/off more clearly right at the beginning. My list of little things to do is long, but I'll add that one :) Thank you for using the asset, your review, and please ask if you need support with something else! Also, I would be interested in downloading your app and looking at your shop when released ;)
     
  25. Gushmeister

    Gushmeister

    Joined:
    Apr 30, 2018
    Posts:
    51
    Within the next Version I'll have it integrated. And I thought off again about it, I should use your shop also for granting free-items. If you want I can make you a Short-Overview how the Playfab-Section in your Doc could look like to make things more clear, also with the needed steps for Visual Studio Code.

    How will I call the functions in Azure from Unity/PlayfabSDK inside my code? You didn't explain that at the end, I don't really know how to call "gimme a free-item" - or will this also automatically be done, if I just make an item that can be unlocked with free-currency??? This would be super fancy, and should also be mentioned in the end, if so.
     
    Last edited: Dec 10, 2022
  26. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    Sure, if you have some spare time, any hints on where you struggled with the integration may help.

    You have several options to approach this:
    - Have an item that usually costs something, but you would like to gift it to the user directly as a reward. How to do that is mentioned here with a sample use case - the PlayFabManager.SetPurchase method calls into the Azure function to also award the item on PlayFab, so nothing more needs to be done.
    - Have an item that usually costs something, but give the user some free currency to buy it (or other stuff). Then, that would be this method. Again the PlayFab part is handled for you automatically.
    - Alternatively you could write your own Azure function to trigger at an exact point in-game, only reached once, or by doing a specific "quest order" in your app.
    - Give the user a free free item (an item that usually costs nothing i.e. has a currency cost of 0): these items are unlocked automatically locally by the DBManager and not uploaded to PlayFab, to minimize web requests as there is no real use of securing them, because, well they are free :)

    As you can see, the requirement "give me a free item" can be interpreted in very different ways but I hope this gives you an idea ;)
     
  27. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Hello bro

    I have a small problem with SIS, can you help me?

    Check what's attached
     

    Attached Files:

  28. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 In line 62 it should probably be SIS.IAPObject, not SIS.GetIAPObject.

    You must be using an old version of SIS? That is no longer supported.
     
  29. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Yes, I am using recent version of SIS (5.2.2). I was using version 2019.4.8f1 and I upgraded to version 2020.3.15 and got this error after changing unity version
     
  30. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 In SIS 5.2.2 the IAPObject class does not exist anymore, it was renamed to IAPProduct as a breaking change. Maybe you meant you upgraded SIS too, not only Unity?

    Your script will not work in that SIS version, you have to look at the upgrade notes and make the necessary changes.
     
  31. oturangames

    oturangames

    Joined:
    Aug 21, 2022
    Posts:
    3
    Hello Flobuk!

    Yes I am using the latest version 4.5.1
    When I am not commenting this line, I am getting the error message I already talked about!
    I hope this is not an important line in the In App Purchasing process.
     
  32. oturangames

    oturangames

    Joined:
    Aug 21, 2022
    Posts:
    3
    Quick reply to my own comment.
    It was been fixed magically on my MacBook.

    I have another question.
    Google does have a limit for the characters of the product ID's for subscription products.
    They only allow 40 characters.
    That is why I had to use a different Product ID than the Apple products.
    I saw that you provide an Override method for the products.

    Is that the correct use case for this?
    Thank you for your reply!
     
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    Yes, the product identifier override should be used when product IDs e.g. on Apple / Google do not match. You can use a global identifier like "mySubscription" for the product, then "mySubscriptionApple" and "mySubGoogle" for each store. In game you would still access the product by the global identifier, "mySubscription".
     
  34. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Hello @Baroni
    I made the change from 2019 unit to 2020 unit and got these 3 errors. how can i solve this problem?

    upload_2022-12-13_14-11-46.png
     
  35. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 The PlayFab extension is a separate package that needs to be imported via the Project Settings window.

    upload_2022-12-13_20-37-34.png

    P.S. I am always trying to answer within a day - no need to follow up with private messages, I get email notifications for everything.
     
  36. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    @Baroni You failed to understand bro. It was all working in Unity 2019.4.8f1. after i updated to unity 2020.3.15 i started getting these errors
     
    Last edited: Dec 14, 2022
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 there is absolutely no difference between Unity versions. You can test this by creating a new project and importing SIS. Unity 2020.3 is what I use when submitting the asset to the Asset Store.
     
  38. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    @Baroni I would like to know what changed to cause the compatibility error... I'm using the old version of SIS because I made integrations in the code for my game. What actually caused these errors when changing versions of unity?

    If you prefer, I can send you the previous asset by email, so you can better check what's going on

    PS: If I import the recent version of SIS, I will get hundreds of errors because I have integrated the SIS code with other scripts in my game...
     
    Last edited: Dec 14, 2022
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 you said you are using SIS 5.2.2, so that was not true? I assumed so because you were referring to old methods and variables before. SIS 5.x was released on April 19, 2021. This means the previous version is older than 1,5 years. I am not able to support that anymore, I hope you understand.

    You have to look into the code and see what's wrong for yourself. For the classes mentioned in the errors, are they missing in your project? Are they not compiled i.e. are you missing a scripting symbol in your build settings? You would need to check this first.
     
  40. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Sorry for not clarifying correctly. I imported the current version of SIS 5.x and I got hundreds of errors, so I'm trying to keep using the old version to avoid changing my code, you know?
     
  41. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    You will not be able to keep the old version of SIS in the future, because the most recent changes in Unity IAP are only incorporated in the current SIS. You can try, but as I said, you would have to investigate on your own why the errors are thrown, I cannot see that from the console log.
     
  42. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Atualmente preciso usar a unidade 2020.3.15 devido a compatibilidade do sdk 33, a Play Store exige isso hoje em dia para fazer upload de jogos...

    Can you give me a light on what might be happening and what should I change?
     
  43. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @Sheyk2022 I have said multiple times that I am not able to see what is wrong by looking at your screenshot. I wrote what you have to check here. The error message is very clear on that and if you have not much programming knowledge, you will also find what it generally means in other threads on this forum.
     
  44. Sheyk2022

    Sheyk2022

    Joined:
    Oct 15, 2017
    Posts:
    26
    Omg!! I didn't see you attached a link to the last answer bro, sorry! I will check that out now, thanks for trying to help me
     
  45. usmanjavaid16

    usmanjavaid16

    Joined:
    Dec 14, 2015
    Posts:
    9
    @Baroni I purchased your SIS plugin for integrating PayPal for iOS mobile. There's a Return URL that we need to mention to redirect the user to a Thank you web page. I want it to redirect back to the mobile app. I couldn't find that in the documentation. Thanks in advance.
     
  46. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    It has to be a https:// website since it would usually be an url on your server where you store purchases for that player. Redirecting back to the app running in the background is not possible.
     
  47. usmanjavaid16

    usmanjavaid16

    Joined:
    Dec 14, 2015
    Posts:
    9
    @Baroni let me explain to you what use case requires PayPal. We would want users/players to add digital currency through PayPal. Basically, $5 would be translated into a digital in-game currency stored in our game. Which users can use in-game. Now we don't offer any website or physical goods so there is no requirement for a website so far.
    How can we achieve that since we don't want users to get lost after doing transaction.
     
  48. usmanjavaid16

    usmanjavaid16

    Joined:
    Dec 14, 2015
    Posts:
    9
    Plus for that purpose app also needs to know if the transaction was successful or not based on which it would allocate digital in-game currency so we would require a callback for that as well.
     
  49. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,268
    @usmanjavaid16 You do know that offering PayPal for virtual purchases is not allowed by Apple, when releasing your app on the Apple App Store? This is indicated in the PayPal guide at the top. The requirement for a website comes from the fact that PayPal does not store any transactions or player inventory itself, so a server or just a simple "thank you" page is required by the PayPal API (this is not something I invented).

    The user has to confirm the transaction after payment inside the app. When not doing this, PayPal will not complete the transaction. This means that if your users would like the reward they are trying to pay for, they have to come back into the app.

    The callback is the same as for all other stores, purchaseSucceededEvent which is implemented in the IAPListener. However if you are granting virtual currency for that product, you can just define that right in the IAP Settings editor (Project Settings).

    upload_2022-12-14_22-13-23.png
     
  50. DuckFuel

    DuckFuel

    Joined:
    Jan 28, 2014
    Posts:
    2
    Hey a quick request from me. I just ran into an issue where a null/not encountered virtual item I'd added would always return 1 when calling DBManager.GetPurchase. It turns out I'd forgotten to set the 'Costs' value, which I only figured out by looking at GetPurchase itself. I appreciate it's intentional behaviour, so can you please add this behaviour to the documentation? Thanks!
     
    Baroni likes this.