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,263
    @copycat-LOL From the same link:
    Allowing the client to send a request to PlayFab, which contains a list of products it would like to have, basically makes all receipt validation and IAPs completely useless, as you would trust the client. I don't know why this is suggested there, but absolutely not something I would ever implement in Simple IAP System.
     
  2. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
    OK - I get that but currently the way it is implemented, it's basically broken. SIS returns false for DBManager.IsPurchased but the call to purchase fails.
     
  3. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    To repeat: because the PlayFab account, which you're logged in with, does not own the product. This is both correct from the perspective of PlayFab and Simple IAP System. But not for the Google Play account you're signed in with.

    It would be your decision to work around this - you can grant purchases to the player account locally each time the app starts, if you wish to. I cannot recommend doing this for all my customers though. Again, it is your decision if you direct players to their original PlayFab account or "trust" the client in this regard.

    Of course you could also try to tell Google they should implement a proper restore transaction into their billing API...
     
  4. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
    How do I get a list of purchases from Google Play to restore them, @Baroni? Do I need to implement IStoreListener, or is there some way for me to piggy back off SIS to do it?

    Danke im voraus!
     
  5. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    334
    Believe I managed to work this out.

    In case it helps anyone else, by comparing the values returned by DBManager.GetAllPurchased() with the product ids returned from PlayFabClientAPI.GetUserInventory, I was able to identify the missing ones.
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    That's one way to do it - another one would be checking IAPManager.OnInitialized and its controller.products list, where each owned product would return hasReceipt == true.
     
    Colin_MacLeod likes this.
  7. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Hi,

    I've began porting my game over to the Nintendo Switch.

    I'm getting some errors:

    I remember reading somewhere that Unity In App Purchasing isn't supported on the Switch, so should I start adding #if !UNITY_SWITCH everywhere I get the errors or is there a more elegant way to handle this? I'd like to keep using your plugin for virtual currency and items.

    Thanks
     
    JBR-games likes this.
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hey, a quicker way would be to just disable Unity IAP in the services window.
     
  9. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Awesome. That wouldn't cause more errors?
     
  10. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @derkoi not if you're separately building for Switch and you aren't still trying to purchase real-money items somewhere :) The IAPManager will do nothing in that case.
     
    derkoi likes this.
  11. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Awesome, thanks. I'll try that.
     
  12. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    @Baroni

    I tried disabling both the IAP and Analytics and still get the same errors unfortunately
     
  13. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Is there a way I could check this without contacting Nintendo? Did you do a clean install of Simple IAP System and imported Unity IAP correctly? Many parts of the scripts are using the #if UNITY_PURCHASING define. For example, ReceiptValidatorClient does not compile any code at all if Unity IAP is disabled.
     
  14. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,260
    Well it's all working fine on mobile devices. I've just put out an update for iOS & Android and it's fine. So i don't know what the issue could be.
     
  15. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi There
    Purchased your asset so I could get some simple Paypal purchases working as a test. I have imported Your asset, setup Unity IAP, installed playfab SDK and eveything is in and working. I have added Playfab to my paypal API as instructed on your paypal guide. I have added the prefabs to your vertical tabs demo scene, added my items to the playfab catalog and in your catalog in Unity. I have set the settings for Standalone to use Paypal for payment. I have also set Playfab to just use validation so not requiring any login. And when I run the scene my items show up just fine but in the console there is the error:
    Code (CSharp):
    1. PlayFabException: Must be logged in to call this method
    2. PlayFab.PlayFabClientAPI.GetCatalogItems (PlayFab.ClientModels.GetCatalogItemsRequest request, System.Action`1[T] resultCallback, System.Action`1[T] errorCallback, System.Object customData, System.Collections.Generic.Dictionary`2[TKey,TValue] extraHeaders) (at Assets/PlayFabSdk/Client/PlayFabClientAPI.cs:257)
    3. SIS.PlayfabStore.RetrieveProducts (System.Collections.ObjectModel.ReadOnlyCollection`1[T] products) (at Assets/SimpleIAPSystem/Scripts/Extensions/PlayFab/PlayfabStore.cs:71)
    4. UnityEngine.Purchasing.PurchasingManager.Initialize (UnityEngine.Purchasing.IInternalStoreListener listener, System.Collections.Generic.HashSet`1[T] products) (at /Users/justing/development/packages/com.unity.purchasing/Source/Runtime/Purchasing/PurchasingManager.cs:255)
    5. UnityEngine.Purchasing.UnityPurchasing+<Initialize>c__AnonStorey0.<>m__0 (System.Collections.Generic.HashSet`1[T] response) (at /Users/justing/development/packages/com.unity.purchasing/Source/Runtime/Purchasing/UnityPurchasing.cs:45)
    6. UnityEngine.Purchasing.UnityPurchasing.FetchAndMergeProducts (System.Boolean useCatalog, System.Collections.Generic.HashSet`1[T] localProductSet, UnityEngine.Purchasing.Extension.ICatalogProvider catalog, System.Action`1[T] callback) (at /Users/justing/development/packages/com.unity.purchasing/Source/Runtime/Purchasing/UnityPurchasing.cs:69)
    7. UnityEngine.Purchasing.UnityPurchasing.Initialize (UnityEngine.Purchasing.IStoreListener listener, UnityEngine.Purchasing.ConfigurationBuilder builder, UnityEngine.ILogger logger, System.String persistentDatapath, UnityEngine.Purchasing.IUnityAnalytics analytics, UnityEngine.Purchasing.Extension.ICatalogProvider catalog) (at /Users/justing/development/packages/com.unity.purchasing/Source/Runtime/Purchasing/UnityPurchasing.cs:43)
    8. UnityEngine.Purchasing.UnityPurchasing.Initialize (UnityEngine.Purchasing.IStoreListener listener, UnityEngine.Purchasing.ConfigurationBuilder builder) (at /Users/justing/development/packages/com.unity.purchasing/Source/Runtime/Purchasing/UnityPurchasing.cs:15)
    9. SIS.IAPManager.Initialize () (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:186)
    10. SIS.IAPManager.Awake () (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:148)
    So that is the first issue, why is it giving that error if I have set Playfab to just use validate and not full? And even with that error the items for sale are correct in the shop window. Secondly, maybe due to this error when I click the button at runtime to buy an item I get the message 'Billing Is not Available' and in the console:
    Code (CSharp):
    1. Unity IAP is not initialized correctly! Please check your billing settings.
    2. UnityEngine.Debug:LogError(Object)
    3. SIS.IAPManager:PurchaseProduct(String) (at Assets/SimpleIAPSystem/Scripts/IAPManager.cs:374)
    4. SIS.IAPItem:Purchase() (at Assets/SimpleIAPSystem/Scripts/IAPItem.cs:253)
    5. UnityEngine.EventSystems.EventSystem:Update()
    So what am I missing? Why do I get the Playfab login error, and why is Paypal purchasing not working, have I missed a step not in your guides? I have tested in the Editor and in a build and both the same.

    I did also try going through the Login scene to see if that helps, but that scene does not seem to work, the Login button function that is supposed to be called is missing according to the inspector. And lastly is there going to be an update to remove all the warnings SimpleIAP gives with Unity 2018.3?
     
    Last edited: Jan 29, 2019
  16. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @SpookyCat, please do not post the same question on multiple channels since I'm reading all of them, but was out of office the past day.

    In our PayPal guide, section 1 mentions "it is required that you've gone through our PlayFab integration guide (Full Suite)" and the limitations that come with this. Did you try out setting the PlayFab implementation type to Full Suite in order to verify the integration first?

    You wouldn't add the prefabs to any of the sample scenes directly, but start the main scenes instead, which already contain them. "UserLogin" scene for PlayFab (Full Suite) billing, and the "AllSelection" scene for all others.

    Since the PlayfabManager fails at logging in, it is expected that UnityIAP cannot initialize for PayPal either.

    The UILogin script has a #PLAYFAB define, so the methods will be linked correctly if you change to Full Suite.

    I have not yet decided about raising the minimum required Unity version for SIS, but it is likely that when Unity 2019.1 comes out, there will also be an update for this.
     
  17. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Ok got it working with Full suite but I was under the impression that Paypal on Standalone could work without having to use Full Suite and having to log in to Playfab. It stops working if I switch back to just Validate instead of Full Suite.
     
    Last edited: Jan 30, 2019
  18. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    PayPal needs your users to log into PlayFab, since they would not be able to receive their previous purchases otherwise - as they are not stored anywhere but in PlayFab. Storing purchases locally would make the app vulnerable for client side hacks, which is why we do not save them.

    I'm going to re-check "Validation Only" with PayPal as that could still be used for selling physical goods without any live connection on app startup (but never virtual goods).
     
  19. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Real goods is what I need it for mainly, plus we store purchases on our own online database so again do not need Playfab to save that data. If SimpleIAP can't do that then I might as well just continue to use the Unity IAP system.
     
  20. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Out of curiosity, how? Since Unity IAP does not support PayPal nor receipt verification for that payment source or any other credit card providers.
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
  22. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Those packages look very broken to be honest :)

    Theoretically "Validation Only" mode should work too :) Still investigating and will report back over the weekend. "Validation Only" mode in SIS+PlayFab would still try to register the user with PlayFab, but much more hidden from the end user since it would be doing it automatically & only at the time of purchase, and only for validation.
     
    JBR-games likes this.
  23. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @SpookyCat I made some additions to the PlayfabPayPalStore class, taking the PlayFab mode (validation/full) into account. Now billing on PayPal using "validation only" signs in the user with PlayFab at the time of purchase. Just fyi - PayPal billing & server receipt validation is integrated in the PlayFab SDK, so we didn't want to write our own PayPal plugin, which we would need to actively develop and monitor. It gets quite demanding with that many supported stores in SIS...

    If you could send me an email, I'll send over the modified script. One more thing: there is an issue with PlayFab not sending over the buyer's shipping address to PayPal. I've already contacted PlayFab for assistance on this.
     
    JBR-games likes this.
  24. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    As always great support!
     
    Baroni likes this.
  25. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Hi there! Does it support subscriptions?
     
  26. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @justtime, yes it does. For checking current subscription states at runtime, you may also look into our server side receipt validation scripts (requires running your own server).
     
    justtime likes this.
  27. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Can i check subscription status without network connection?
     
  28. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    The subscription products are retrieved by the App Stores. If Unity IAP can't initialize billing due to missing internet connection, you can't check their status either.
     
  29. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    So i have to check it myself, right? I mean user has some subscription only features, which can work without connection and i need somehow check moment when subscription is expired.
     
  30. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @justtime You could, however that would require saving the subscription purchase receipt locally which makes your app vulnerable to hacks. This is why we are offering the server side option which check subscriptions on app launch - though requiring an internet connection for it.

    Both ways are possible and have tradeoffs so you have to decide which route you would like to take.
     
    JBR-games and justtime like this.
  31. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    After some research and consideration, as well as contacting PlayFab regarding their PayPal plugin which is being used in Simple IAP System, it is clear that PlayFab does not support selling physical products. That's because of them:
    1. displaying a fixed product description regardless of what products were purchased, and
    2. not enabling the shipping address for PayPal (but also saying that they never got a request for it)

    I've played around with Shopify and found their solution very good in terms of shipping options, email notifications, shop designs and payment providers offered. Instead of hacking something together or writing our own PayPal plugin, I'm going to investigate integrating Shopify's Unity SDK into Simple IAP System (optional, of course). The plan would be to have it separate from the billing plugin used, so that each build platform would support selling both virtual and physical goods.
     
    JBR-games likes this.
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Making more use of your very nice system but come across a problem, I added a second currency in the IAP settings window, now if I try and export to json I get an exception and no files are saved.

    ArgumentOutOfRangeException: Index and length must refer to a location within the string.
    Parameter name: length
    System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    SIS.IAPEditorExporter.ToJSON (System.Collections.Generic.List`1[T] IAPs, System.Boolean playfabVersion) (at Assets/SimpleIAPSystem/Editor/IAPEditorExporter.cs:199)

    What have I done wrong? Also before this I have been trying to import the json files created by SIAP into playfab but everytime I get an internal error from playfab when uploading the json, have you come across that before?
    Also I added some Virtual products which your video guide says do not need to be added to the playfab settings but if I don't I get errors saying the item can not be found.
    And lastly I have two currencies, coins and fuel, what are the settings for an item so that I can buy fuel with coins. If I set the item type to Currency I don't see a way to specify which currency is used for the purchase and what current is earned from the purchase. Changing the Selected Currency value changes all the items.
     
    Last edited: Feb 16, 2019
  33. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @SpookyCat

    Just tested and the export works fine with two currencies. Could you check your currency names and make sure they have at least 2 characters?

    Unfortunately PlayFab does not tell what is wrong with the file, but it is something with its content. You could copy-paste the file content into an json online formatter to see whether it has a correct json format to begin with.

    The guide says free virtual products do not need to be added. Virtual products are considered free, and auto-granted on app launch, when their required virtual currency prices are set to 0. In fact, the "SimpleIAPSystem_IAPSettings_PlayFab.json" file excludes them automatically, as written in the guide.

    "Currency" products grant currency, not subtract it, since they are being bought with real money only. See below for an implementation instruction.

    "Selected Currency" is a dropdown changing the current selection. Changing the current currency selection does not mean that the other one is lost, it's just that it is difficult to display multiple currencies at the same time, so you can switch between them easily at one place. E.g. you can enter values for currency 1, select currency 2 and enter values for it as well - both currencies are then being used for one product.

    Since "Currency" products are for buying currency with real money, you would create a "Virtual" consumable product for your "buy fuel with coins" case. By default, the currency amount entered is substracted when buying the item. You can enter a negative amount as well though, which would then grant currency, instead of substracting it. So for example if you enter the following for your item: coins = 100, fuel = -10. This means that coins is reduced by 100, and fuel increases by 10.

    Hope this helps.
     
    JBR-games likes this.
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Thanks for the reply, seems a restart cleared whatever was causing the exception when exporting json. And thanks for clearing up how the currency thing works in the window that helps, but it also showed up the problem with uploading the json to playfab, if I have a negative value in the Cost/Earnings section then Playfab doesn't like it and gives an error, resetting the value to 0 and Playfab imports the json as expected.
    I am doing it myself by using the DBManager.IncreaseFunds method from the IAPListener HandleSuccessfulPurchases method and that works fine, with calling the PlayfabManager.SetFunds method, is that the right way of doing it?
     
    Last edited: Feb 17, 2019
  35. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Thanks for the notice @SpookyCat, I am looking into a better way for this to be handled with PlayFab. First I thought about using DBManager.IncreaseFunds for this manually too, like you are doing, which is perfectly fine.

    I assume you are not using "Validation Only" then, but the "Full Suite" option, as you are trying to update the currency amount on PlayFab as well? Because with "Validation Only", there is no synchronization on player login thus the PlayFab side would not matter. You can keep it that way, although the client call to PlayfabManager.SetFunds can be avoided when setting up your item on PlayFab as a bundle, like this:

    upload_2019-2-17_17-18-5.png

    Same example as before - price is 100 CO (coins), unlocking the bundle grants 10 SK (e.g. fuel currency). Using the json export/import "Currency" products are set up as bundles on PlayFab automatically. However since the combination (virtual product in SIS, bundle in PlayFab) is a bit special, you'll have to create this bundle on PlayFab manually.
     
  36. BmDeveloperz

    BmDeveloperz

    Joined:
    Jul 1, 2013
    Posts:
    62
    Hey,

    I have just bought the asset and trying to setup Steam IAP. I had already a working iap setup for ios and android. I just want to add steam iap too. I followerd these steps carefully;

    https://www.rebound-games.com/forum/index.php?topic=596.0
    https://www.rebound-games.com/forum/index.php?topic=647.0

    I don't get any error or assertions. When i try my build on steam, it says "PaymentDeclined". I can't test it on editor since it requires to build for steam and have steam overlay on it.

    What issues can cause this window to pop up? Also could you make a steam integration video tutorial please? There might some important steps that people might missing since there is zero guides or video tutorials about implementing steam iap to the unity.

    Many thanks
     
  37. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi Olcay,

    the reason for that is because everything related to the Steamworks SDK and dashboard is under NDA by Valve, so I won't be able to upload a detailed guide either. 'PaymentDeclined' without the actual purchase window showing up beforehand usually means that your app could not establish a connection to the store provider.

    Some things to check:
    - are you able to enable the Steam overlay for your executable?
    - did you enable sandbox testing on PlayFab?
    - did you modify the app Id as described in our guide, with your own paid app Id?

    Note: if the Steam overlay cannot be triggered, purchases won't work at all. Check that your app in Steamworks is of category "Game".

    We're currently migrating our forum to a new backend with restricted access to buyers of our products, so I might be able to post a guide there in the coming weeks.
     
  38. BmDeveloperz

    BmDeveloperz

    Joined:
    Jul 1, 2013
    Posts:
    62

    Hey,

    I did all those things. I got the steam overlay. I checked if its sandbox and yes it is. Also i modified app id too and double checked if its activated or not. I'm not sure what to try next.

    I also tried revert all the files and do all step by step again but the result was the same.

    I hope we could solve it somehow.

    Thanks for the answer.
     
  39. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @Olcay could you start the app in development mode? It should produce a log file next to the executable, which could contain more info for us to debug the issue.
     
    JBR-games likes this.
  40. BmDeveloperz

    BmDeveloperz

    Joined:
    Jul 1, 2013
    Posts:
    62
    @Baroni i find the solution. I think the web api key might be wrong guided on the web page. To generate the web api key i used these steps from the steam page.
    https://partner.steamgames.com/doc/webapi_overview/auth#create_publisher_key

    Also in lots of playfab web api issue forums people says that they solved the issue by using that api key.
    https://community.playfab.com/quest...entloginwithsteam-steam-webapi-error-0-i.html
    https://community.playfab.com/quest...-error-0.html?childToView=23498#comment-23498
    https://community.playfab.com/questions/3658/loginwithsteam-failed-with-webapi-error-102-ticket.html

    These pages were useful to solve my issue.
     
    Baroni and JBR-games like this.
  41. v_James_v

    v_James_v

    Joined:
    Feb 13, 2016
    Posts:
    40
    Hi @Baroni
    I'm updating one of my apps and noticed I didn't have Encrypt enabled on the DB Manager. If I now enable it for this update will that affect users who have already purchased non-consumable IAPs?
    Thanks
     
  42. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    Hi @v_Jay_v,

    toggling encryption in live games will result in the database file getting unreadable. You can also see this happening when testing in the editor. Please see our disclaimer in the documentation pdf for this.
     
    v_James_v likes this.
  43. v_James_v

    v_James_v

    Joined:
    Feb 13, 2016
    Posts:
    40
    Ok cool, thank you :)
     
  44. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    I meant "unreadable" as in, your app will throw an exception when it launches and the database file getting corrupt, so definitely DO NOT toggle that for already published games.
     
    v_James_v likes this.
  45. v_James_v

    v_James_v

    Joined:
    Feb 13, 2016
    Posts:
    40
    Yep thanks Baroni, I've left it as is (un-encrypted).
     
  46. Chaz32621

    Chaz32621

    Joined:
    Apr 17, 2015
    Posts:
    199
    I keep getting this error when trying to buy, :Unity IAP is not initialized correctly! Please check your billing settings."

    I've gotten playfab integrated with it along with Google play store and have it in beta mode for testing. (Dl it from google console testers) any clue why this isnt working? Do I need to initialize unity iap in my own script or will iap manager do all this?
     

    Attached Files:

  47. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @Chaz32621 Please see this checklist for common mistakes for initialization. Our IAPManager does the initialization for you. If you followed all the steps, debug the device directly for more details. Also please register on our dedicated support forum (same link) in case you have further questions.
     
  48. Chaz32621

    Chaz32621

    Joined:
    Apr 17, 2015
    Posts:
    199
    I did see somewhere there is a setting in unity3d I might have missed. A google play setting in the edit drop down. I think that could be the issue. Will get back with you.
     
  49. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi,

    I keep getting these errors:

    Assets/SimpleIAPSystem/Editor/IAPEditor.cs(7,19): error CS0234: The type or namespace name `Purchasing' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

    Assets/SimpleIAPSystem/Editor/IAPEditorExporter.cs(7,19): error CS0234: The type or namespace name `Purchasing' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

    I have tried to Reimport the asset from asset store. I have reimported the Unity IAP. Only way to get these errors away is to turn off the IAP from Services.

    I have followed your YouTube tutorial video but I don't know what to do?
     
  50. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,263
    @Nadan these errors occur when Unity IAP is not imported correctly.

    - enable Unity IAP in the services window
    - click the import button in the same window to download the Unity IAP plugin
    - in your project, look out for the UnityPurchasing folder that has been created
    - if there are unitypackage files in this folder, Unity could not extract their content automatically. Double click the unitypackage files to import
    - the errors should be gone