Search Unity

Introducing Unibill - the cross platform In App purchase plugin!

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

  1. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
  2. super-cypher

    super-cypher

    Joined:
    May 10, 2014
    Posts:
    117
    hey Banderous,

    i really want to buy your plugin but i cant until it has playmaker actions (or until you tell me playmaker suppport is coming 'very' soon!). i build my entire game using playmaker so no coding.

    please give me the good news that you are just about to release an update with full playmaker support?...please...

    you are missing out on a monster market...

    cheers.
     
  3. silviobadseed

    silviobadseed

    Joined:
    Nov 28, 2013
    Posts:
    32
    @Banderous I sent a complete trace to support e-mail. But what is it supposed to be that key? I have only 3 consumable IAP set so if "ownedItems" retrieves some not consumable items I think it should be right if there's no key like that, isn't it? Or is it supposed to be there anyway?
     
  4. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
  5. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    Hi,

    We are having some problems with Unibill in our production release for some users on Windows Phone. Two things seem to be happening, firstly anyone that has been on our beta program can't do a purchase at all. When they had the beta, we were using the mock framework, but even after deleting the old version of the game, it seems to fail. When you click the buy button or restore button, nothing happens. If a full factory restore is done, it will work then.

    My other problem is the game crashes constantly after a purchase has been made for some users. The game functions properly before the purchase, but crashes after.

    Unfortunately, as this is in production, I don't have any stack traces or anything. The best I can get is running a debug build with the appID and pubID set. When I do that, I get the error that no products have been returned, but I don't know if thats expected on a non-beta/release build.

    Is there something I could have missed that would stop it from working for a few users?
     
  6. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @kujo This is best discussed via support@outlinegames.com.

    Re: the beta issue, you should be able to get a trace by installing and running from visual studio.

    Re: purchase crash, please let us know if this is immediately following the purchase, or a few seconds later, etc.
     
  7. silviobadseed

    silviobadseed

    Joined:
    Nov 28, 2013
    Posts:
    32
    @Banderous does unibillAmazon support in-app-purchasing-2.0.1 jar file?
     
  8. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @silviobadseed Unibill already uses that jar, it's just called 1.X because we can't remove files when upgrading packages.
     
  9. catbert

    catbert

    Joined:
    Aug 15, 2012
    Posts:
    1
    I/Unity ( 3587): AndroidJavaException: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.billing.InAppBillingService.BIND }
    I/Unity ( 3587): at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
    I/Unity ( 3587): at UnityEngine.AndroidJNISafe.CallVoidMethod (IntPtr obj, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
    I/Unity ( 3587): at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
    I/Unity ( 3587): at UnityEngine.AndroidJavaObject.Call (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
    I/Unity ( 3587): at Unibill.Impl.RawGooglePlayInterface.initialise (Unibill.Impl.GooglePlayBillingService callback, System.String publicKey, System.String[]
    productIds) [0x00044] in D:\Work\CLE\trunk\mcar2\Assets\Plugins\unibill\src\GooglePlay\RawGooglePlayInterface.cs:23
    I/Unity ( 3587): at Unibill.Impl.GooglePlayBillingService.initialise (IBillingServiceCallback callback) [0x00106] in

    It can not be initialized on Nexus 5 Android 5.0
    It works well on Galaxy S4 Android 4.4.2
    Please help me.
     
  10. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @catbert Either set your target android version to <= 19 or contact support@outlinegames.com with your purchase receipt for the latest version, which fixes this.
     
  11. CarpetHead

    CarpetHead

    Joined:
    Nov 22, 2013
    Posts:
    20
    There has been some chatter about this before, but can anyone tell me if they have got this plugin working with the prime31 facebook and twitter social plugins? Or perhaps some other social plugin?
     
  12. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @CarpetHead Is there a specific problem you are having? Unibill does not override the main activity, so it should play well with others.
     
  13. mpulkkinen

    mpulkkinen

    Joined:
    Apr 8, 2013
    Posts:
    15
    I had similar issue, the problem was that onPurchaseComplete was called before the game was on foreground and I was setting some dialogs active in the same function, so that crashed the game completely. Solution ( not the prettiest one ) was to make the dialog wait for event from windows phone xaml side that tells when application is resumed + added couple of seconds delay with "Processing..." progress...
     
  14. Poelam

    Poelam

    Joined:
    Aug 29, 2013
    Posts:
    5
    I also have the problem that Unibill failed to init on Nexus 5 Lollipop. And I already build it with android version <19.
    But I don't have the error message on console like the one in post #559
     
  15. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
  16. kujo

    kujo

    Joined:
    Aug 19, 2013
    Posts:
    106
    Sorted it with something similar. Unibill was getting initialised right on start up which caused my crash as I make a call to turn off ads etc which isn't initialised until later. so I've simply deferred the Unibill init until the ads manager has loaded. once that has happened, i can ensure its all available and off we go :)
     
  17. Poelam

    Poelam

    Joined:
    Aug 29, 2013
    Posts:
    5
    @Banderous Thanks for quick response, I resolved it after update the Unibill to latest version.
     
  18. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Hi,

    I have 2 questions:
    1) Is it possible to read the prices from the stores online, so Unibill could update it's database when business folks want to change prices they can do it in the google play, ios store etc. and don't have to fiddle around with unibill and change it in the stores as well... What's the most convenient way to do so?

    --> found it correct me if I'm wrong but that seems to work
    Unibiller.AllPurchasableItems[0..n].localizedPriceString

    2) Is there an api call I am missing to start a refund of a product. I am using a server side receipt validation, which works fine, but what would I do when our validation server is down? The problem is the user buys something in the store, money transaction is done, but the app can't reach our server and so the credits are not booked on their accounts because this is done if validation is right. What I would like to do is make the purchase undone/refund, so the user gets back his money...



    thx rob
     
    Last edited: Dec 7, 2014
  19. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @polycular Correct, that's how you get localised details.

    It isn't possible to refund products from an in app purchase api, it would represent a security hole. You might be able to on google play using google's developer api.

    You should save the receipts locally and push them up when you can.
     
    Last edited: Dec 7, 2014
  20. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    I'm testing my game without internet connection, after calling Unibiller.initialise, I get the following error that brings my game almost unplayable

    Unibill: Attempting to fetch Storekit product data...

     
  21. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @spartan you can change the offline polling frequency within UnibillStorekit.mm with the line

    [NSThreadsleepForTimeInterval:X];

    where X is the number of seconds to wait.
     
  22. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    @spartan also make sure to call Unibiller.initialise just once. See below...

    @Banderous I'm not sure if that's a bug or misuse but I recently found out if you call Unibiller.initialise more than once while it's still polling for initialization it appears to be start another polling thread causing the game become unresponsive.

    I had unibill initialization in my menu screen. When the device offline, if I go to a game level and come back to menu it made the game unplayable (most easily noticeable at older devices) as it starts another polling thread.

    To fix that I've used a loader scene which initalizes the unibill then moves on the menu screen.
     
  23. spartan

    spartan

    Joined:
    Mar 10, 2010
    Posts:
    174
    I have one Unibiller.initialise, the issue is that Unibiller.initialise is not checking internet connection and it keeps bugging the game trying to initialise in an infinite loop, solution: I made a custom CheckInternetConnection()

    if (CheckInternetConnection())
    Unibiller.initialise();
     
  24. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @spartan Unibill is designed to check continuously, you can just reduce the frequency of the check.

    @PixelEnvision that sounds like a bug, Unibill should not initiate again whilst it is currently initialising (although it is an error to make the call).
     
  25. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    Hi me again,

    If I change the price in the Google play store, price changes when the native dialog comes up but the prices I query with
    Unibiller.AllPurchasableItems[0..n].localizedPriceString stays the same as before. I am on Android so I tried a reboot and once it actually worked and the new price got displayed in my GUI, but trying this again with a different price has failed me. I tried to call Unibiller.Initiallise() whenever I enter the dialog but that leaves the prices unimpressed. Not sure how to force Unibill to get the prices which are not cached locally somehow...

    Another question I have is if it is possible to get the currency symbol and not the isostring EUR, USD but €,$ I can fix this with some code in C# just wondering if there is an easier way already...
     
  26. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @polycular it is likely the prices are cached by the google play app. If you clear the google play app's local data you may find the price updates. Unibill does not maintain its own cache.

    It should be easy to go to a currency symbol, but the localizedPriceString is already provided as a preformatted price.
     
  27. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello; I have updated to unity 4.6.1 and got a weird serialization error when building (I am not sure it has a connection with unibill)

    I updated unibill to latest version (december 6 version) and updated some other plugins. I couldn't get rid of that error and decided to downgrade to unity 4.5.5f1 for now.

    I didn't modify any script, and in editor unibill works fine, but when building I am receiving this error; (Windows Phone 8 build)

    Error building Player: Exception: Error: type `Unibill.ProductDefinition` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void InAppPurchaseManager::Start().
    Error: method `System.Void Unibiller::Initialise(System.Collections.Generic.List`1<Unibill.ProductDefinition>)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void InAppPurchaseManager::Start().
    Error: method `System.Void Unibiller::add_onPurchaseDeferred(System.Action`1<PurchasableItem>)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void UnibillDemo::Start().
    Error: type `Unibill.ProductDefinition` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void UnibillDemo::Start().
    Error: method `System.Void Unibiller::Initialise(System.Collections.Generic.List`1<Unibill.ProductDefinition>)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void UnibillDemo::Start().

    I tried removing unibilldemo from my project, and I am still getting error on basic unibill functions (such as initialise) from my unibill script.

    Error building Player: Exception: Error: type `Unibill.ProductDefinition` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void InAppPurchaseManager::Start().
    Error: method `System.Void Unibiller::Initialise(System.Collections.Generic.List`1<Unibill.ProductDefinition>)` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void InAppPurchaseManager::Start().
     
  28. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Meceka It sounds like you're missing files. ProductDefinition should be at Assets/Plugins/Unibill/src/impl/ProductDefinition.cs
     
  29. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    I've checked it and it's right there.
     
  30. Frenchie92

    Frenchie92

    Joined:
    Jul 4, 2013
    Posts:
    10
    Hi @Banderous . Sorry if this question has been already answered but it's not possible to search just this thread =( I can see that Unibill supports "subscription" type purchases; however, the only detail I could see on the documentation is that they have "a finite window of validity." Does Unibill support automatic recurring monthly subscriptions? Or do users have to "re-subscribe" every month?
     
  31. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    I have reverted to a back up that has an earlier version of unibill and it builds fine now. Weird thing is, on current project (not backup) I tried completely removing all files from unibill and installing new version again with re-downlaod and re import, and it didn't work. It means it installed update correctly but probably new version has a problem on me. I hope I can use it this way.
     
  32. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Frenchie92 Auto renewal is handled by Apple/Google etc rather than Unibill. Unibill can give you the subscription receipt, which you then use to validate that a user is a legitimate subscriber.

    @Meceka I'm not sure how you could be encountering that error, will investigate further here.
     
  33. Dean-Kuai

    Dean-Kuai

    Joined:
    Jun 17, 2013
    Posts:
    24
    I got the same problem, my game runs slower without an internet connection (especially on iPhone 4, with low memory warning). it always stuck on Unibill: SKProductRequest::didFailWithError: 0, (null), (not each time running game)

    another error message causes stuck:
    Unibill: SKProductRequest::didFailWithError: 0, Error Domain=SKErrorDomain Code=0 "The operation couldn’t be completed. (SKErrorDomain error 0.)"
     
    Last edited: Dec 21, 2014
  34. polycular

    polycular

    Joined:
    Oct 8, 2014
    Posts:
    17
    @Banderous regarding the google play cache is there a way to invalidate it via a unibill functionality or do you know of a way from inside the app? I mean it is nice that it caches but can you set the time to refresh or whatever, otherwise the prices displayed in my gui are out of sync with the real shop prices, not sure if this ever then works again when u don't manually delete the cache... can't be the only one facing this kind of problem
     
  35. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Dean Kuai You can reduce Unibill's polling frequency by changing the
    sleepForTimeInterval line's sleep parameter of 2 seconds in UnibillStorekit.mm.

    @polycular There is no way of invalidating the cache, it's internal to the google play app. It also occasionally causes purchase state to get out of sync with google's servers.
     
  36. Dean-Kuai

    Dean-Kuai

    Joined:
    Jun 17, 2013
    Posts:
    24
    In my case, a video is played using PlayFullScreenMovie at the start of the game in a blank level (will pause the game, and unibill is initializing at the same time). After the video, a new menu level is loaded , then the game seems stucked by Unibill(maybe? the game step forward one frame each time an "attempting to..." message is print in Xcode). I also had changed the interval to 20s, it just stuck much longer. Maybe the video (or the pause of the game) causes some problem in unibill's initialization?
    The above happens on all my devices. On iPhone 4 (only), a lighter stuck occurs on each "attempting..." message with or without the video. After changing sleep time to 20s, it's looks much better.
     
    Last edited: Dec 23, 2014
  37. cbothra

    cbothra

    Joined:
    Mar 14, 2014
    Posts:
    125
    Hi Community,

    UnibillBiller: Google Play returned no products as available for purchase. Have you defined your purchasable items in the Google Play publisher console?.

    I am getting the above mentioned error. I've also read the previous threads regarding this error being faced by some other developers and covered each of the mentioned case, but still I am getting this error. Please note that my app was also published in ALPHA testing from google.

    Any help would be highly appreciated. Thanks-in-advance.
     
  38. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @cbothra the comprehensive list of criteria for testing is here.
     
  39. cbothra

    cbothra

    Joined:
    Mar 14, 2014
    Posts:
    125
    Thanks a lot. Actually everything was at its place other than the wait time of 24 hrs. :D
     
  40. Miggy

    Miggy

    Joined:
    Feb 9, 2010
    Posts:
    76
    Just purchased Unibill and I'm a little confused about this:

    I was under the impression that managed products could only be purchased once by a user. Will it be possible for a user to buy these products marked 'Consumable' more than once?

    Thanks.
     
  41. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Miggy Yes, Managed products can be consumed. That's why it's important to mark them as consumable in the inventory editor so Unibill will do so for you.
     
  42. Kastar-Troy

    Kastar-Troy

    Joined:
    Jul 18, 2012
    Posts:
    29
    Does anyone have a good post or example of where they have verified the google play receipt using the Google API from NuGet in a .NET web service with c#(Azure preferably)?

    Or an easy to follow post which is up to date if they have done it from scratch?
     
  43. nbaris

    nbaris

    Joined:
    Jan 13, 2015
    Posts:
    27
    I did some testing with some static Google Play in app products, but now they're stuck in limbo and stop the inventory from being successfully queried. Apparently this is a bug with the testing system.

    Code (csharp):
    1. W/IabHelper(27313): In-app billing warning: Purchase signature verification **FAILED**. Not adding item.
    2. I/Unibill (27313):    Purchase data: {"packageName":"com.xxx.xxx","orderId":"transactionId.android.test.purchased","productId":"android.test.purchased","developerPayload":"","purchaseTime":0,"purchaseState":0,"purchaseToken":"inapp:com.xxx.xxx:android.test.purchased"}
    3. I/Unibill (27313):    Signature:
    4. I/Unibill (27313): Continuation token: null
    5. I/Unibill (27313): Ending async operation: refresh inventory
    6. I/Unibill (27313): onQueryInventoryFinished: false
    7. I/Unibill (27313): Error refreshing inventory (querying owned items). (response: -1003:purchase signature verification failed)
    I need to get rid of the "android.test.purhcased" on the server, any suggestions for how to do this with Unibill?

    'void Unibiller.clearTransactions();' clears the local cache, but I want to do this for Google's record. The second answer here ( http://stackoverflow.com/questions/26641052/error-refreshing-inventory-in-app-billing ) details a method, but it involves manipulating the java code
     
  44. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
  45. nbaris

    nbaris

    Joined:
    Jan 13, 2015
    Posts:
    27
    @Banderous Thanks, I had tried it, but it doesn't solve my problem. This seems to be some silly bug with the in app billing testing system (not with Unibill). In the end, since I didn't want to delve into java code, the 'simplest' solution was to delete the app and create a new one. I would advise anyone to just publish an apk to alpha production to test in-app billing, and avoid using the "android.test.purchased" static tests.
     
  46. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    Do you have a server component for verifying receipts that works with all the platforms?
     
  47. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Saxi not as such, what is your reason for verifying the receipts?
     
  48. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    To prevent IAP theft.
     
  49. Banderous

    Banderous

    Joined:
    Dec 25, 2011
    Posts:
    669
    @Saxi Unless you're making an online game you're better off validating the receipts locally with additional validation routines. It's faster and much more robust since it doesn't involve network communication.
     
  50. Saxi

    Saxi

    Joined:
    Jun 28, 2013
    Posts:
    381
    A lot of the stuff is network based and you can't trust the local device to be secure.