playMaker

Author Topic: Unity IAP method for Playmaker.. what works best ?  (Read 397 times)

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Unity IAP method for Playmaker.. what works best ?
« on: May 04, 2019, 05:05:38 AM »
Hi all, fumbling around in the dark with the IAP setup. Worked out a system that I thought was suitable, but it turns out it has flaws.
Basically..: click on IAP button to get rid of ads. IAP sends message to FSM and enables a bool, then Easy save encrypts and saves that bool. On game start, check for bool and disable ads accordingly.
Works fine for a while but now debug log is saying 'error item already owned' So I need to implement a way to test if item is owned and enable the bool to remove ads.
I have no idea how to do this ...any suggestions?  What works for you? What is your method of handling IAPs?
Thanks

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #1 on: May 04, 2019, 10:10:50 AM »
Assuming Android, you want to make sure that the IAP is considered a 'non-consumable'.

Also on Android if you were to uninstall and reinstall, Google is supposed to automatically "repurchase" the non-consumables for you. 

They also have receipt validation, which I have not implemented, but you can find more information here on the subject.  https://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #2 on: May 04, 2019, 05:48:48 PM »
Thanks, yes on Android and I have marked the object as non consumable. You're right, it came about because of multiple uninstalls/ re installs. I'll look into the link you provided, I saw the file obfuscation/ validation reference but couldn't quite get my head around it. Will study up on it...more stuff to learn...

Assuming Android, you want to make sure that the IAP is considered a 'non-consumable'.

Also on Android if you were to uninstall and reinstall, Google is supposed to automatically "repurchase" the non-consumables for you. 

They also have receipt validation, which I have not implemented, but you can find more information here on the subject.  https://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4323
    • View Profile
    • jinxtergames
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #3 on: May 05, 2019, 03:24:28 AM »
Hi.
I would suggest getting an iap asset, there are many on the store.

search for "iap playmaker'

I use 'ultimate mobile' or 'easy mobile pro' on my projects as they are more complete solutions (achievements, ads, etc.)

but 'easy iap' or 'iap manager' should work just as well.

it is a good time to purchase one now, as they are on sale at the moment
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #4 on: May 05, 2019, 11:13:28 PM »
Yes djaydino,  good idea.
I actually purchased  Gley's 'Easy IAP' and got it up and running, still not working on the Android device though... Google and Android is such a PIA...always some problem. Just as well I make buckets of money from the games.....cough..
Have been in touch and he's helping with solutions, just wish I knew an Android geek programmer!


Hi.
I would suggest getting an iap asset, there are many on the store.

search for "iap playmaker'

I use 'ultimate mobile' or 'easy mobile pro' on my projects as they are more complete solutions (achievements, ads, etc.)

but 'easy iap' or 'iap manager' should work just as well.

it is a good time to purchase one now, as they are on sale at the moment

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4323
    • View Profile
    • jinxtergames
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #5 on: May 06, 2019, 12:18:50 AM »
Hi.
It has been a while (few years) since i pushed something on android.
What problems are you encountering?
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #6 on: May 06, 2019, 03:45:34 AM »
Basically having problems with the IAP and also Easy save communicating the device.  Easy save3 seems to not work at all but es2 does? Go figure. With the easy IAP, it just keeps going to error mode. The problem is no errors showing on playmaker or the console. Even on the debug monitor that comes with Android studio there is nothing I can pick up. I've had the same type of system working before with no problems. I beginning to think it's a Unity bug...their IAP system not great to say the least. Even using the Unity IAP button the problem exists, the dummy purchase window comes up but nothing will process. Even uploading to the live game (not a great idea) and the problem is still there. Completely at a loss on this one....

Hi.
It has been a while (few years) since i pushed something on android.
What problems are you encountering?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4323
    • View Profile
    • jinxtergames
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #7 on: May 06, 2019, 10:15:20 AM »
Hi.
Not sure if this is still needed, but is your device setup as test device?

Maybe contact the creator of easy IAP?
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #8 on: May 07, 2019, 06:58:44 PM »
Yes, device all set up properly. Have been in touch with developer who says it works fine ???  Don't fancy forking out more money for Stan's assets when one I bought a few years ago is now deprecated... tired of this merry go round....
I don't understand why Unity doesn't build on and improve it's monetary code? IAPS are the only thing that keeps developers on mobile platforms going.
Glad Playmaker is solid and consistent in it's updates and support...please don't stop!

Hi.
Not sure if this is still needed, but is your device setup as test device?

Maybe contact the creator of easy IAP?

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #9 on: May 07, 2019, 07:10:09 PM »
There are IAP actions on the Playmaker Ecosystem which utilize Unity's IAP.  I use 'em and haven't had an issue yet. 

If you ever planned on buying assets, almost everything is discounted for the month of May so now would be the time  ;D

shamo

  • Playmaker Newbie
  • *
  • Posts: 38
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #10 on: May 08, 2019, 02:24:12 AM »
Can you elaborate please, which actions are you referring to?  Perhaps you could share with us the methods you use that work?
Basically I need to check that an item has been purchased previously so ads can be removed.

There are IAP actions on the Playmaker Ecosystem which utilize Unity's IAP.  I use 'em and haven't had an issue yet. 

If you ever planned on buying assets, almost everything is discounted for the month of May so now would be the time  ;D
« Last Edit: May 08, 2019, 02:47:57 AM by shamo »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #11 on: May 08, 2019, 08:26:45 AM »
Quote
Basically I need to check that an item has been purchased previously so ads can be removed.

Thats receipt validation and thats the only thing missing from the Ecosystem's action set, created by TCMERIC.

ch1ky3n

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #12 on: May 10, 2019, 08:10:51 AM »
1. Enable Unity In App purchase under services and don’t forget to import
2. Make sure you setup the in app purchase on playconsole and make sure it is published
3. If things works correctly, you should be able to choose your items ID inside the unity after you update the resources (the bunch of text that playconsole generated with the command “generate Resource”).
4. Go to windows > unity in app purchase > iap catalogue and fill everything in
5. Go to windows > unity in app purchase > iap purchase button

You don’t really need pm action for in-app purchase, unity already done it with simple buttons

As for receipt, you can use gley in app purchase to detect if the user already purchased the items. In android it is done automatically. However, in IOS, you need to explicitly create a “restor purchase” button inside the game. Since ios required user to enter the user and password. Hope it helps
« Last Edit: May 10, 2019, 08:14:11 AM by ch1ky3n »

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Unity IAP method for Playmaker.. what works best ?
« Reply #13 on: May 10, 2019, 02:01:50 PM »
Quote
In android (receipt verification) is done automatically.

I think thats the concern.  I understand google re-purchases the In App Purchases of non-consumables on behalf of the customer when they reinstall the app.  But how would your app track that google restored a purchase without receipt verification?