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 @Shivaji_Games, at that part the validation already happened. It happens in line 85.

    If you want to reward a user, the red area is the correct place. Also see the documentation which says: "You will then want to reward the user in case the PurchaseState is Purchased (not in case it is Failed) ..."

    Please also note my last reply to you above. If you are using Simple IAP System in your project, you are using the wrong SDK. For dedicated Receipt Validator support, please use the "Support" button in the Receipt Validator dashboard.
     
  2. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    It seems like I don't have the "sandbox" purchase option after release, requiring real money to test purchases. Is there a way to reenable it? Some users are reporting that the in-app purchases aren't being completed. I'm investigating the situation and might report later if it's anything in the library.
     
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
  4. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Sorry, I forgot to mention that it's for Steam. I had the sandbox payment prior to release, now that the game is released I don't have that option anymore, just the option to pay with the wallet funds.
     
  5. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @mbast Oh. Sorry, I received lots of different support requests lately. In Simple IAP System (or better Steamworks.NET) there is only one API for both environments, Sandbox and Production. The Steam backend then determines what environment to use, based on your logged in Steam user and your app publishing status. If the game is published, it really seems to be impossible to do sandbox testing anymore, as confirmed here:
    https://forum.unity.com/threads/sandbox-mode-not-enabled-for-steam-microtransactions.1321587/

    The Steam API actually has a dedicated sandbox endpoint for its Web API that is listed on this page at the top:
    https://partner.steamgames.com/doc/webapi/ISteamMicroTxn

    However, Simple IAP System uses the native steam dlls provided by Steamworks.NET, not the Web interface.
     
    mbast likes this.
  6. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hello, does this asset support Playfab Economy V2 ?

    Catalog v1 and Currency v1 are marked as legacy now (although still working)
     
  7. mbast

    mbast

    Joined:
    Dec 19, 2018
    Posts:
    17
    Yeah, I saw the API endpoint and I was wondering if it could be changed using the SDK. I'll have to do tests with 0.25$ packages for now. Thanks for the clarification though. And nice job understanding the messy Steamworks documentation, the amount of time you just saved me is worth way more than the package value or whatever I'd have to spend in microtransaction tests.
     
    Baroni likes this.
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @DevNoody, currently the asset uses v1 which is still used by several developers in production apps. I would not be able to support both versions, but it is planned to transition to v2 in the near future.

    @mbast I appreciate kind words and also Asset Store reviews ;)
     
  9. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Thanks for the quick reply!
     
  10. Nayjest

    Nayjest

    Joined:
    Aug 7, 2013
    Posts:
    4
    Hi!
    I have a problem:
    After clicking "Buy" on Steam Purchase Overlay, it just disappears and I'm always getting items without payments.
    Any Ideas? Is that default steam microtransactions behaviour for developer accounts? Which type of key / account I should have to test my iap with real money?
     
  11. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, SIS.DBManager.IsPurchased("product ID") Is already returning true, before purchasing (pressing button). And If I press the purchasing button it says Item already purchased... any clue ?
     
  12. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hello @Nayjest, your Steam Purchase Overlay should look like this, where it mentions "Payment Method: My Steam wallet (sandbox)". Sandbox mode does not cost real money. If you would like to test a real money transaction, you can do so by creating or logging into another Steam account (therefore not your developer account) and do a closed or open testing phase - please see the official documentation for more details on this.

    Hi @Shivaji_Games, you must have purchased the item already. Simple IAP System caches the purchase state locally and also retrieves it from the App Store. So if you would like to a new purchase test, you have to delete the cache locally (see example scene 11) and in addition, Google Play: revoke the transaction (Order management tab) or on Apple App Store: create a new sandbox tester account or delete the existing tester's purchase history in the same tab (see "Add test accounts" section in the guide, takes up to 24 hours).
     
  13. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, as you mentioned I deleted the cache by calling "DebugCalls.Reset", but still SIS.DBManager.IsPurchased returning true even I created a new ProductID, still it's returning true without clicking the purchase button. when I hit unity play it's returning true from the beginning only
     
  14. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @Shivaji_Games On what platform? Did you specify a price in the IAP Settings for the product? Without a price it will be granted for free, automatically.
     
  15. Jon_Wick

    Jon_Wick

    Joined:
    Jul 12, 2017
    Posts:
    9
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @Jon_Wick, thanks for asking! Currently all SDKs use Unity IAP under the hood.

    In theory, all IAP plugins should offer the same receipt data though, maybe in a slightly different format. So you could either try to use REST endpoint and send the receipt data using a POST request to the Receipt Validator yourself, or if you would like to use a component that does cover everything for you, I would be willing to create one for you for a subscription or small donation :)
     
  17. Jon_Wick

    Jon_Wick

    Joined:
    Jul 12, 2017
    Posts:
    9
    hm it seems voxel is using Android/iOS native plugin or smth because Unity IAP services are off in my project
     
  18. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Yes, I know that Voxel Busters does not use Unity IAP. Still, it should provide you with the receipt data after a purchase, like Unity IAP does.

    With my offer for creating a component for you, I meant writing one for the Voxel Busters asset, if that wasn't clear.
     
    Jon_Wick likes this.
  19. Jon_Wick

    Jon_Wick

    Joined:
    Jul 12, 2017
    Posts:
    9
    Just checked ReceiptValidator, it seems it uses Unity IAP and will not work without
    using UnityEngine.Purchasing;
    using UnityEngine.Purchasing.Security;
    Is your custom component offer includes switching from Unity IAP to android native IAP?
    unfortunately Unity IAP makes my android build process more complex, so it's better to avoid it..
     
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Yes, for whatever the Voxel Buster asset uses.
     
    Jon_Wick likes this.
  21. Jon_Wick

    Jon_Wick

    Joined:
    Jul 12, 2017
    Posts:
    9
    let's discuss in PM scope and cost
     
  22. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hello, quick question about currencies and Playfab integration

    My game has two currencies:
    1. Credits: frequently obtained ingame by performing various activities
    2. Crystals: rarely obtained ingame, can be purchased with RM
    My shop has items than can be bought with Credits, Crystals or both.

    Since Credits are updated frequently, I figured it would be best to store them localy with my already existing save system, to avoid too many web requests to playfab. I also don't really care if the player hacks this value.

    Crystals on the other hand will only be stored and updated server side, following your guide on Playfab Integration.

    What would be the best way to handle this scenario ? Should I just code Credits and Credits purchases separately and use SIS for Crystal related stuff only ?
     
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hey, I wouldn't do it that way. You could limit the API requests for Credits to one call per game (at game end), for example. Or once every 5 minutes, only on application quit, whatever suits best.

    Since you say your shop offers items for credits, by handling credits locally you would basically allow every cheater to get every item for free, or would be forced to offer all items without PlayFab too (as the server never has the correct credits amount of the user).

    Ultimately it is your decision, of course. If the items for credits do not have much in-game value you could handle them yourself.
     
  24. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Thanks, I guess I'll try to do it this way and implement a cooldown on my auto save to cloud.

    One more question, about rewards this time. For exemple, one of my shop item will be a 5% skill boost.

    I understand that I should add this logic inside HandleSuccessfulPurchase() method within IAPListener, is this correct ?

    However, on game load, how to apply this logic again when restoring the player purchases ?
     
  25. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    If it's a consumable purchase that only applies for the current session, the IAPlistener would be the correct place to redeem the purchase immediately.

    In case it's a non consumable purchase, you would instead check for the purchase state when your game launches to apply it:
    Code (CSharp):
    1. if(SIS.DBManager.IsPurchased("your product"))
    2. {
    3.    //apply skill boost to player
    4. }
     
  26. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, 1 of my IAP button working like charm. when I purchase it, it's returning true. But Unfortunately another button not working, it's returning false despite giving IAPListner Report HandleSuccefullPurchase("name of my productID")

    Please see Image IMG20230318220424.jpg
     
  27. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @Shivaji_Games Did you set that product to non-consumable in the IAP Settings too? The default is consumable. If yes, please show a screenshot of the Project Settings > Simple IAP System > Tools tab which shows your local database data.
     
  28. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Yes it's set to non-consumable IMG20230318235618 (1).jpg
     
  29. Benjaben22

    Benjaben22

    Joined:
    Oct 26, 2012
    Posts:
    75
    Oop I didn't realize my last message was a DM.

    Just following up on it. It ended up working on Android using the IAPListener.HandleSuccessfulPurchase function. I'm not really sure what's changed though and if there might be potential side effects.
     
  30. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,967
    Hey @Baroni! VB team here!
    Once a purchase is made we fire a callback event with IBillingTransaction instance. It contains Receipt property which is actually the purchaseToken on android native. So, as server verification only needs purchaseToken, you can just pass Receipt value to your server.

    Please let us know if you need any help!
     
    Last edited: Mar 20, 2023
  31. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hello, I'm running into an issue when trying to mix Upgrades & Unlocks:

    Let's say I have the following Products and using the Locked prefab:
    - Product 1: level 1 requirement, next upgrade is Product 2
    - Product 2: level 10 requirement, next upgrade is Product 3
    Etc..

    Now when I level to 1, Product 1 unlock and I can purchase it, but then Product 2 is automatically available, eventhought I'm not level 10 yet.

    Any ideas on how to implement this behavior ?
     
  32. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hello, thanks for the screenshot. That's difficult to tell without further information. You would want to compare both products for any differences in the IAP Settings editor. Specifically, that both products have their own product ID set as a reward. In the Receipt Validator backend, I could see both of your sandbox purchases were validated correctly.

    @Benjaben22 Great! I'm not sure what OnPurchaseSucceeded method you were referring to anway, that must have existed ages ago :)

    Hey @Voxel-Busters! Thank you for the additional details, however the user decided to implement this on his own. I am very convinced of your work, so I fully assumed that there is a simple way to integrate remote receipt validation.

    Hi @DevNoody, thanks for the report! Actually it seems no one used unlocks on an upgrade product before (me included), so I was totally unaware that it does not work as expected. In ShopItem2D script, once a product is purchased the product is initialized with the next upgrade without checking for requirements again. In the Refresh method at the end, it should check for the Requirement and unlock or lock the product. Currently, it only checks for an unlock. Should I send you a fix via PM or would you like to wait for an update (not scheduled yet)?
     
  33. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello Thanks. That issue got resolved by replacing it's bundle with new ones, In my Receipt Validator Dashboard I can't see any validation approved or any data, that I purchased while testing, how I can see those please tell me?
     
  34. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    On the App list go to the details for your app and scroll down. The sandbox validations are listed there.

    upload_2023-3-20_14-59-12.png
     
  35. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hello, thanks for the reply! Yes if you could provide a quick code fix via PM that would be awesome, thanks !
     
  36. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, Does Restore works in sandbox ? as I am using "UIButtonRestore.Restore" or SIS.IAPManager.RestoreTransaction to restore which one is correct way? And my another question Do "HandlePurchaseSuccessful" runs everytime when game starts, I am also noticing weird thing when I press restore button then it won't work, but when I close game and reopens it then it's working. Please Help
     
    Last edited: Mar 21, 2023
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Yes, sandbox purchases do work for restore. On the server dashboard you can see several same transactions you re-sent yesterday which were re-validated each time.

    If you look at the code of UIButtonRestore, it does nothing more than calling IAPManager.RestoreTransaction. So you can choose what to use. It is just a sample script demonstrating the functionality.

    No, HandlePurchaseSuccessful is only called in the current session after a new purchase happened or was restored.

    Unfortunately that's not enough information to help. Could you explain what "is not working"? Is the restore method called, sent to the server, receives a response, processed and set to purchased in the DBManager again?
     
  38. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    I cleared Local Data (DebugCalls.Reset) and when I relaunch game I see those codes I put inside HandlePurchaseSuccessful are getting called and purchased products got restored automatically, am getting these logs, please see...

    2023-03-21 23:04:45.574582+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Restore transactions

    2023-03-21 23:04:45.575093+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: RestorePurchase

    2023-03-21 23:04:45.582946+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Requesting 0 products

    NullReferenceException: Object reference not set to an instance of an object.

    at UnityEngine.Purchasing.CodelessIAPStoreListener.GetStoreExtensions[T] () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.IAPButton.Restore () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [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.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0

    UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    UnityEngine.EventSystems.StandaloneInputModule:process()


    2023-03-21 23:04:45.601608+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Requesting product data...

    2023-03-21 23:04:45.681406+0530 IndianBikeAndCarGame[1247:63035] UnityIAP: Received 0 products

    Purchasing failed to initialize. Reason: NoProductsAvailable

    UnityEngine.Purchasing.CodelessIAPStoreListener:OnInitializeFailed(InitializationFailureReason)

    UnityEngine.Purchasing.PurchasingManager:CheckForInitialization()

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

    UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)

    System.Action:Invoke()

    UnityEngine.Purchasing.Extension.UnityUtil:Update()


    2023-03-21 23:04:45.709358+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Add transaction observer

    2023-03-21 23:04:45.709758+0530 IndianBikeAndCarGame[1247:62769] UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments

    2023-03-21 23:04:48.233700+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: UpdatedTransactions

    Purchase not correctly processed for product "com.shivajigames.indianbikeandcargame.removeadsA". Add an active IAPButton to process this purchase, or add an IAPListener to receive any unhandled purchase events.

    UnityEngine.Purchasing.CodelessIAPStoreListener:processPurchase(PurchaseEventArgs)

    UnityEngine.Purchasing.PurchasingManager:processPurchaseIfNew(Product)

    System.Action:Invoke()

    UnityEngine.Purchasing.Extension.UnityUtil:Update()


    Purchase not correctly processed for product "com.shivajigames.indianbikeandcargame.allvehA". Add an active IAPButton to process this purchase, or add an IAPListener to receive any unhandled purchase events.

    UnityEngine.Purchasing.CodelessIAPStoreListener:processPurchase(PurchaseEventArgs)

    UnityEngine.Purchasing.PurchasingManager:processPurchaseIfNew(Product)

    System.Action:Invoke()

    UnityEngine.Purchasing.Extension.UnityUtil:Update()


    2023-03-21 23:04:48.250049+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: PaymentQueueRestoreCompletedTransactionsFinished

    NotImplementedException: The method or operation is not implemented.

    at SIS.IAPManager.OnTransactionsRestored (System.Boolean obj) [0x00000] in <00000000000000000000000000000000>:0

    at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0

    at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.Extension.UnityUtil.Update () [0x00000] in <00000000000000000000000000000000>:0


    Another Log



    2023-03-21 23:06:39.915482+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Restore transactions

    2023-03-21 23:06:39.915988+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: RestorePurchase

    NullReferenceException: Object reference not set to an instance of an object.

    at UnityEngine.Purchasing.CodelessIAPStoreListener.GetStoreExtensions[T] () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.IAPButton.Restore () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [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.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0

    UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    UnityEngine.EventSystems.StandaloneInputModule:process()


    2023-03-21 23:06:42.084482+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: PaymentQueueRestoreCompletedTransactionsFinished

    NotImplementedException: The method or operation is not implemented.

    at SIS.IAPManager.OnTransactionsRestored (System.Boolean obj) [0x00000] in <00000000000000000000000000000000>:0

    at System.Action`1[T].Invoke (T obj) [0x00000] in <00000000000000000000000000000000>:0

    at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.Extension.UnityUtil.Update () [0x00000] in <00000000000000000000000000000000>:0


    Another Log.


    2023-03-21 23:08:21.688283+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: Restore transactions

    2023-03-21 23:08:21.688688+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: RestorePurchase

    NullReferenceException: Object reference not set to an instance of an object.

    at UnityEngine.Purchasing.CodelessIAPStoreListener.GetStoreExtensions[T] () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.IAPButton.Restore () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [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.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0

    UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    UnityEngine.EventSystems.StandaloneInputModule:process()


    2023-03-21 23:08:23.468321+0530 IndianBikeAndCarGame[1247:62769] UnityIAP: PaymentQueueRestoreCompletedTransactionsFinished
     
  39. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    And codes written inside "HandleSuccessfulRestore" are not working when I click RestoreTransaction on my IOS Device.
     
  40. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @Shivaji_Games From the logs I can only see that you are still mixing UnityIAP codeless and Simple IAP System. You should not use codeless or IAPButtons in a project with Simple IAP System. You will have to deactivate codeless, remove any products from the codeless catalog, and remove your CodelessIAPStoreListener. This is what calls the restore method you are seeing.

    Use only Simple IAP System components, its IAP Settings and ShopItem prefabs or own buttons instead.
     
  41. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, I just remove In App Purchasing package from package manager, Now getting error messages from SIS scripts. I searched "codeless" in project but didn't got anything so I deleted Unity In App Purchasing package, when I reimported In App Purchasing package then error message got resolved, so can you please help me how I can remove codeless ?
     
  42. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    @Shivaji_Games The Unity In App Purchasing package is required.

    You should not do anything mentioned in the following documentation, including its IAP Listener.
    https://docs.unity3d.com/Manual/UnityIAPCodelessIAP.html

    You are running into several issues with the basic setup, as it seems you are not experienced with Unity IAP in general, although you used it in your project before. Optionally I would offer to take a look at it if you wish (paid).
     
  43. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    almost everything is done only restore not working correctly due to codeless interference as u said, please tell me charges
     
  44. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    I already wrote that in the log you posted the CodelessIAPListener is called and that should not happen since it should not exist in your scene in the first place.
     
  45. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Can you search it in my project ? if yes please tell me charges
     
  46. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Great !! I found Codeless in my package, just removed it. Thank you very much
     
    Baroni likes this.
  47. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, Now after removing Codeless, getting this log.

    2023-03-22 03:44:10.718962+0530 IndianBikeAndCarGame[440:13904] UnityIAP: Restore transactions

    2023-03-22 03:44:10.719116+0530 IndianBikeAndCarGame[440:13904] UnityIAP: RestorePurchase

    NullReferenceException: Object reference not set to an instance of an object.

    at UnityEngine.Purchasing.CodelessIAPStoreListener.GetStoreExtensions[T] () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Purchasing.IAPButton.Restore () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1].Invoke (T1 handler, UnityEngine.EventSystems.BaseEventData eventData) [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.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () [0x00000] in <00000000000000000000000000000000>:0

    at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <00000000000000000000000000000000>:0

    UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    UnityEngine.EventSystems.StandaloneInputModule:process()


    2023-03-22 03:44:12.622258+0530 IndianBikeAndCarGame[440:13904] UnityIAP: PaymentQueueRestoreCompletedTransactionsFinished
     
  48. Shivaji_Games

    Shivaji_Games

    Joined:
    Apr 2, 2020
    Posts:
    28
    Hello, I have created a new project and imported Unity Purchasing, and it also contains Codeless files in Package by default, and when I removed it automatically created itself again. codeless.PNG
     
  49. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    The above lines indicate that you are still using an IAPButton with the CodelessIAPStoreListener in your scene. I hope you understand that I am not able to provide a step by step guide for you on what to do, since this is your project and therefore out of support.

    You cannot just delete files within Packages, they are included in the your PackageManager manifest and the IAP package. This is against PackageManager principles.
     
  50. DevNoody

    DevNoody

    Joined:
    Sep 8, 2021
    Posts:
    10
    Hey Baroni, any news on this ? Would really appreciate if you could share a fix or some advice since I'm not 100% familiar with your codebase yet, don't want to break anything