Search Unity

Introducing Unibill - the cross platform In App purchase plugin!

Discussion in 'Assets and Asset Store' started by Banderous, Jan 16, 2013.

  1. ConjureScape

    ConjureScape

    Joined:
    Feb 14, 2013
    Posts:
    445
     
  2. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @3d_game_ready Localised prices are set by the underlying billing system; Apple, Google etc. The editor has no way of knowing what those localized prices will be, so they are empty in the editor.
     
  3. ConjureScape

    ConjureScape

    Joined:
    Feb 14, 2013
    Posts:
    445
    Thanks Banderous.
    That settles it.
     
  4. affreuxgeorges

    affreuxgeorges

    Joined:
    Feb 13, 2013
    Posts:
    15
    Hi!
    I just purchased UniBill and can't get the PlayStore to work correctly on my android Phone.
    I receive a CRITICAL_ERROR failure...

    what I did =
    -create non-published project on google play
    -create developer wallet
    -upload .APK code version 3
    -create usertest account / log on my phone with that account
    -bulk upload CSV generated with unibill

    It seems to work using AmazonSDK and amazon payments, but with googleplay store i always end up with the CRITICAL_ERROR failure...
    What are possible reasons for this to happen?
    is it due to google play's updates of in-app-purchases or APK taking too much time?
    Do I need to publish the project?

    Thx to help me, i'm stuck in my progress...
    -buildAndRun the project on my phone.
     
  5. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Make sure you create a Keystore in Unity, rather than using the default keystore, and that Keystore has to match the Keystore that was used to make the .APK you upload. And your local game's Bundle Version Code has to match the version that was uploaded as well.

    Oh, and it can take some time after you add products to the Google Play store before they are accessible to your game, sometimes a few hours.
     
    Last edited: Feb 3, 2014
  6. affreuxgeorges

    affreuxgeorges

    Joined:
    Feb 13, 2013
    Posts:
    15
    Thx, yeah I have the keystore and version code/bundle things right,
    I just wonderer if the critical error behaviour was normal for google play items not already availible through the game, or if I did anything else wrong...
     
  7. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Critical error can happen for a few reasons, one is if no products at all are found on the store. I believe Critial Error only happens at initialize.
     
  8. affreuxgeorges

    affreuxgeorges

    Joined:
    Feb 13, 2013
    Posts:
    15
    First of all, Thank you.
    My main concern is :
    Should the app in google play console be published, with my APK in alpha or beta,
    or is it sure it will work with a Draft app and Draft production APK ?
     
  9. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Oh yeah, my app is still a "Draft", but the purchasing is all working for my test users. You should only need to switch to Alpha/Beta mode to actually start charging for purchases.
     
  10. affreuxgeorges

    affreuxgeorges

    Joined:
    Feb 13, 2013
    Posts:
    15
    Ok thx, so I may just have to wait for GooglePlay to update my items...
    let's see tomorrow!
     
  11. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Hey, any luck on this? Apparently, it happens if the player is buying a consumable product, and then the game crashes when returning from the purchase. Then next time that consumable is purchased on that device, it comes up with the error that the item has already been purchased, and does not give it to you.
     
  12. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Dreamwriter not as yet. The transaction should be aborted by Apple in such a situation I believe, since it wouldn't be finalised by Unibill.

    I'll continue to investigate, no repro here yet.
     
  13. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    You're right, Apple treats it as a canceled purchase (and supposedly the problem on iOS is really a bug with how the sandbox works, not something you'd see in a real product). Our big problem now is with Android giving that message for consumables.
     
  14. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Unibill looks for any consumables that haven't been consumed every time it boots. If a crash were to occur just after a transaction finished, the consumable would be fulfilled on next boot.
     
  15. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Right, but there are cases where the Google Play store somehow gets in a state where it gives an error message that the item was already purchased but not downloaded, and when that happens Unibill isn't handling it.
     
  16. Miguel Portilla

    Miguel Portilla

    Joined:
    Feb 25, 2013
    Posts:
    2
    Hey Banderous,

    Any chance of you fixing this today? We've been waiting on this fix for a while now and are unable to ship our game because of it. I haven't heard back from you through email.

    Unibill cannot be used in a commercial product, this bug will break any game that uses it.

    If you send us the source code we will gladly fix it for you. This is a matter of urgency, please fix and support your product.
     
  17. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Miguel, I have not been able to reproduce this. As I have stated, Unibill explicitly checks for and consumes any consumables that haven't been fulfilled upon startup.

    I will email the source for the Android jar to Dreamwriter.
     
  18. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Dreamwriter @Miguel - to double check:

    - What version of Unibill are you using?
    - Are you sure you have defined this IAP item as consumable within the inventory editor?

    Please then send a logcat trace from startup, through to the purchase failing to support@outlinegames.com, along with your inventory file.
     
    Last edited: Sep 4, 2014
  19. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    We're using Unibill 1.3.2, and yeah, we have three consumables that occasionally have the problem, all defined correctly in the inventory editor; the problem can happen with any of the three consumables. Unfortunately, we don't have a logcat for the bug handy.
     
  20. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Do you have any device/account where the consumables are in an inconsistent state? Ie where you are no longer able to purchase them?

    If so a logcat from them would be useful.
     
  21. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    This might be a silly question, but I'm letting Unibill manage my ingame currency and there are instances where i just want to set the total directly. All i seem to be able to find is a debit and credit of the currency, but no set...did I miss something? whats the right way to do this?

    Thanks,

    Ben
     
  22. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Ben There isn't a method to do this currently. You can add this to CurrencyManager.cs which will be in the next release:

    Code (csharp):
    1. public void SetBalance(string id, decimal amount) {
    2.   storage.SetInt (getKey (id), (int)amount);
    3. }
     
  23. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Unibill 1.4.0 is now available, featuring Samsung Apps support!

    This brings to seven the number of billing platforms supported by Unibill.

    As ever contact support@outlinegames.com with your purchase receipt for an advance unity package, buy it at outlinegames.com/unibill or wait till it gets approved in the Unity Asset store.
     
    Last edited: Sep 4, 2014
  24. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Hello Banderous!

    I'm thinking of buying your plugin, but there's one thing I'm wondering about.

    If I were to buy, lets say 100 Gold as consumable. I then want to spend 50 of those Gold coins to buy a non-consumable item (in other words an item that is registered as an IAP-product), would this be possible? What I mean is: is it possible to give non-consumeables in exchange for the virtual currency and not 'real' money (if it is, would it still show a confirmation dialog where one needs to enter their Apple-password)?

    Thank you!
     
  25. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Not in exactly the same way; when you buy a non consumable IAP for real currency, Apple, Google etc store the purchase and associate it with the user's account. The purchase can be restored via the restoreTransactions() method call.

    You could emulate this yourself by debiting their currency balance and giving them access to the non consumable, but there would be no record of the purchase outside of the device's local storage - ie if they wipe their install they have no way of getting it back unless you track it on your own server somewhere, which is non trivial.

    Most games do not provide permanent records of non consumable purchases.
     
  26. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Thank you for the quick-reply, that clarified a lot!

    I'm amazed you get stuff done when you're here most of the time (if you're the developer)! :p

    Do you have an estimate of when virtual items will be implemented? Would be great to have before we start implementing the item system we have in mind! :)



    Okay, so this doesn't violate any rules regarding refundable items? :eek:
     
    Last edited: Feb 17, 2014
  27. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Maisey virtual items should be out in the next point release, likely a week or two.

    What rules do you mean?
     
  28. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    By the way, with the update you gave us, we haven't been able to reproduce our problem, so yay! Although, it was always a rare thing, hard to reproduce, so we'll still keep an eye out for it and if it happens again we'll get the details and let you know what's going on. Thanks for your timely support.
     
  29. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Dreamwriter good to hear!
     
  30. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Sounds great about the virtual items! Mind explaining a bit how it will work?

    I can't find the exact rules that I thought I read somewhere (maybe only applies to 'real' In-app purchases), but it seems wrong that a person can pay 10$ for 100 gold, and then they spend those 100 gold on some virtual goods, then they remove the app and has 'lost' 10$ because I can't track what they have bought and not bought. I know this has nothing to do with your plugin and how you do stuff, I just thought I read this somewhere.

    Sorry for going off-topic!

    Thanks again!
     
  31. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    There's not much to virtual items; just the ability to define items in the inventory editor that you can tell Unibill have been bought using one of your virtual currencies.

    Essentially it amounts to debiting a currency balance and setting a flag that an 'item' is owned, which is why I've never prioritised it.

    Edit - and yes, it is a bad experience for purchased items to disappear which is why you should use non consumables wherever possible.

    However it is a lot more fluid to spend a virtual currency than a real one; there's no interruption with IAP confirmation screens, slow card transactions etc.
     
    Last edited: Feb 17, 2014
  32. RelentlessLouis

    RelentlessLouis

    Joined:
    Feb 8, 2013
    Posts:
    5
    We're having the same issue. Has anyone found a way to get the correct currency string (with symbol) from UniBill?

    Note: We'll need this for AppStore, GooglePLay and Amazon Store. We seem to get only the correct price without any currency symbols.
     
  33. langju

    langju

    Joined:
    Jul 1, 2009
    Posts:
    207
    Well,

    In fact this is working, a few months ago i thought that there were a problem but that was not the case ! (i'm talking about iOS)
    To check this, simply use a Debug.Log of your localized price ==> you'll see the price and the symbol.

    The real problem was the use of a NGUI with a font that doesn't had the characterset in it. To generate my fonts I use bmglyph, i have simply added the missing symbols in it before publishing my font to unity3d. After generating the font with the font maker tools of NGUI, all works perfectly.

    So, be sure that your font Atlas and Data can use the currency symbols...
     
  34. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @RelentlessLouis As langju says, this is most likely a problem with the way you are displaying currency symbols rather than their absence from the localised strings.
     
  35. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,259
    I have the permission to hijack this thread for a moment, so here it goes :)

    Alex (Banderous) cooperated with me on the newer versions of Unibill, making it compatible with Simple IAP System!



    It was a pleasure working with Unibill on this project, its API is well thought out and very extendable. I must admit that after reading through the docs and writing this extension, I'm now becoming a fan of it myself. The combination of cross-platform billing and dynamic shop layouts just makes it better ;)

    Happy Unibilling!
     
  36. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    hey all, i really like Unibill, so far its looking good!

    My question is: I'm letting Unibill manage my in-game currency, and I'm in a situation where i need to make a quick standalone build for the PC...which i just found doesn't run..

    Are there any quick changes i can make to get this to work? I don't want to get IAPs working, just the game running at all

    Thanks

    Ben
     
  37. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @HaroldBalls the latest version should use the fake billing platform used in the editor on any platform that is not supported. What version are you on?
     
  38. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    it looks like im on the latest...

    i just get "argument exception: unsupported platform: Windows player"

    In my code all i do is call call initialize(), then ask for the latest balances etc..
     
  39. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @HaroldBalls right you are, sorry. I've just changed this which will go out in the next release.

    For now you can modify UnibillConfiguration.cs around line 94, replacing the throwing of the exception with CurrentPlatform = BillingPlatform.UnityEditor;
     
  40. RED STOMP

    RED STOMP

    Joined:
    May 23, 2013
    Posts:
    4
    I'm having some trouble with androidmanifest. After the last upgrade its not merging automatically anymore. You can proveide what activities i need to make it work again
    ?
     
  41. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    Last edited: Sep 4, 2014
  42. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    Hello again Banderous!

    Got another question.

    Let's say i buy 100 coins for 10$, this is 100 "consumable" coins, correct? If I then do DebitBalance("coins", 1) and then do CreditBalance("coins", 2), how many "consumables" do I have left? My guess is 99, my concern is; what happens when I now buy something for 100 coins. Will Unibill try to consume 100 coins and throw an error or is this handled internally (meaning it differentiate the consumable coins and "pure virtual coins", so it will actually consume 99 coins and deduct 1 coins from the "pure virtual coins")?

    Thank you!
     
  43. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Maisey in this scenario you'd have 101 coins.

    I don't know what you mean about 'pure virtual coins'. As far as unibill is concerned, a currency is a balance that can be incremented (by purchases or credits) and decremented (by spending).

    If you try to debit an amount greater than the balance then nothing will change and unibill will return false.
     
  44. Maisey

    Maisey

    Joined:
    Feb 17, 2014
    Posts:
    302
    I was totally mistaken about how it worked, as you might understand I've never implemented IAPs before. :)

    I was under the impression that when you buy a "gold-pack"-item that you were actually given 100 consumables and each time you used "DebitBalance" you would consume that amount of gold. In that way when you used restoreTransactions() you would get the correct amount of gold back (minus the gold given by CreditBalance). So, do you never consume the "gold pack"? If you do, when do you do it? If you never consume the "gold pack", wouldn't that mean that the user can install the game on another device and then "use" restoreTransactions() and they would be given all the gold they ever purchased (even if it has already been used)?
     
  45. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Maisey no, you would buy a single gold pack consumable item. Unibill credits a local balance in player prefs, which is then decremented as the currency is spent.

    Consumables are not tracked or restored with restore transactions, so there's no way of double spending them.
     
  46. MagicFrame

    MagicFrame

    Joined:
    Jul 18, 2013
    Posts:
    42
    Hi Banderous, couple question before buying the plugin,

    My game requires subscriptions as Unibill behaves subscriptions? How can I detect if a subscription is active or not? Any information would be appreciated. Also say that my game is for iOS and Android.
     
  47. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @MagicFrame if the purchase count of the subscription is greater than 0, it is owned by the player:

    Code (csharp):
    1.  
    2. Unibiller.getPurchasableItemById("your subscription unibill id").PurchaseCount
    3.  
    Note there are some issues around automatic subscription expiry/cancellation not always being detected by Unibill, to be fixed in the next couple of updates.
     
  48. MagicFrame

    MagicFrame

    Joined:
    Jul 18, 2013
    Posts:
    42
    Thanks for responding, has a release date for the next version? It is important to detect when a subscription has been canceled or expired …

    Best regards
     
  49. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @MagicFrame Within the next couple of weeks
     
  50. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    Hey Banderous, we submitted our game to the Amazon App Store for Kindle, and a reviewer told us this:

    "It seems you are adding/appending currency symbol in the getPrice() method which is leading to error. In live getPrice() Returns the localized price of the item as a String. The price will include the currency symbol and be formatted appropriately based on the locale, i.e. in US $X.YZ and in France X,YZ€."

    Now, that reviewer may be out of it, considering the official reason we were told we were rejected was different, but I figured I'd make sure all our bases were covered.