Search Unity

Facebook IAP

Discussion in 'Unity IAP' started by Baroni, Jan 1, 2017.

Thread Status:
Not open for further replies.
  1. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,261
    Hi,

    after Unity 5.6 beta came out there was an announcement for the Facebook build target including support for IAPs. The IAP services page also shows an icon for Facebook. Is this in yet? Will it be included in a later beta or final release?
     
  2. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,261
    Just found a Unity IAP package on the Gameroom page, which includes two suspicious Facebook dlls. The FacebookStoreBindings class seems to be implemented. Any additional docs on that?

    Edit: I've got a product to display with its price set up in Facebook's Payments Lite dashboard and the purchase confirmation does show up in-game. I don't want to really pay for it though, how to enable test mode or choose a test user in Gameroom?
     
    Last edited: Jan 2, 2017
  3. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    Hi,

    The download link on the Gameroom page (here) is the correct source for Unity IAP for Facebook during the beta. There are no Facebook-specific extensions, so really all you need to do to make it work is set up your products in Canvas Payments after enabling Canvas Payments Lite for your game. To enable test purchases you must add the numeric user ID for any test users to the Testers field at the top of the Canvas Payments page. Once that is set up the payment dialog will show "Always Succeeds" and "Always Fails" for payment methods.
     
    Baroni likes this.
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,261
    I've totally missed that field, thank you very much! Works as expected :)
     
    JayR likes this.
  5. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    One other thing worth noting is that while Canvas Payments does not include the notion of "product type" in the setup information, Unity IAP will treat a product as Consumable if you specify that in your game's builder.AddProduct() calls.
     
    Baroni likes this.
  6. dasjlm

    dasjlm

    Joined:
    Nov 6, 2015
    Posts:
    3
    Just tried to run the demo in the beta IAP code but get errors as listener etc not set up. I assume that is just an oversight and we are expected to complete the implementation. Do you know if I can use with the Codeless IAP? ie: Modify the IAPButtonStoreManager?
     
  7. JayR

    JayR

    Joined:
    Aug 2, 2016
    Posts:
    84
    The demo scene and script in the beta plugin should work fine in Gameroom apps as long as you have matching products set up and Lite payments enabled in Canvas.

    If you're seeing errors then we'll need more detail on your environment and to see the player logs.

    Codeless IAP support is not included in the current beta plugin for Facebook but will be available when Gameroom support is officially released.
     
  8. dasjlm

    dasjlm

    Joined:
    Nov 6, 2015
    Posts:
    3
    Thanks. I thought I was missing something.
     
Thread Status:
Not open for further replies.