You can follow the official documentation here:
https://docs.unity3d.com/Manual/UnityIAPSettingUp.htmlGet these Playmaker actions:
https://github.com/dumbgamedev/IAP_PlaymakerIn Unity, goto Window > Unity IAP > IAP Catalog
ID = com.psguy.newgame.disablead
Type = Non Consumable
Fill in title + description, as these are what your players will see if they try to buy on IOS/Android. Then click on App Store Export and pick the export for your store of choice.
Next, you will want to export a copy of the game and upload it to the store of your choice. In my example, I am using google play developer console. Once thats done, go to the main page of the console:
https://play.google.com/apps/publish/ find your app and click on it. Then go to Store Presence > In-App Products > Manage Products then click on import / export, locate the file you exported and import it. save.
basic flow would be to check to see if encrypted player prefs exist (easy save3) or playerprefs. If not, goto state WaitForInput with 2 states called 'Success' and 'Fail'. If purchase success, create playerpref, if purchase failed, reset (goto start state)
Window > Unity IAP > Create IAP Button -- this will make a new button in the scene. Set the product id (com.psguy.newgame.disablead) to what you made earlier. Set Button Type to purchase, and it will have 2 settings. On Purchase Complete and On Purchase Fail.
Have Purchase Complete set to Editor and Runtime with PlaymakerFSM.Send Event, then find the gameobject with the FSM you wish to manage and for the event name call it 'Success'. Do the same for On Purchase Failed, but have the event name be 'Fail'