[Closed] 1.8.1 Tizen IAPs

Hi,

we are trying to integrate Tizen IAPs with the demo.

We initialize the IAP system, but as soon as we call Initialize, we don’t receive any callback. Neither success, nor fail.

Debug.Log("TizenIabDemo calling UnityPurchasing.Initialize"); //we get this log.
UnityPurchasing.Initialize( this, builder );
//never called:
public void OnInitialized( IStoreController controller, IExtensionProvider extensions )
//never called:
public void OnInitializeFailed( InitializationFailureReason error )

If we look at the logs, we see that the IAP items are all listed though, like:

I/Rosmry  ( 3191): RosmryBizLogicItemList.c: RecvGetItemListCb(337) > [Rosmry][RosmryBizItemList] RecvGetItemListCb()
I/Rosmry  ( 3191): RosmryUtil.c: RosmryUtil_GetResultCode(141) > [Rosmry][RosmryUtil] errorCode  : 0
I/Rosmry  ( 3191): RosmryBizLogicItemList.c: __RecvGetItemListCb(360) > [Rosmry][RosmryBizItemList] result : 0
I/Rosmry  ( 3191): RosmryUtil.c: RosmryUtil_GetResultCode(141) > [Rosmry][RosmryUtil] errorCode  : 0
I/Rosmry  ( 3191): RosmryUtil.c: RosmryUtil_GetResultDescription(254) > [Rosmry][RosmryUtil] ResultDescription  : 6005|0|Success
I/Rosmry  ( 3191): RosmryBizLogicItemList.c: __RecvGetItemListCb(366) > [Rosmry][RosmryBizItemList] ResultDescription : 6005|0|Success
I/Rosmry  ( 3191): RosmryBizLogicItemList.c: __RecvGetItemListCb(407) > [Rosmry][RosmryBizItemList] pRespArray->count : 19
I/Rosmry  ( 3191): RosmryBizLogicItemList.c: __RecvGetItemListCb(421) > [Rosmry][RosmryBizItemList] pItemId  : 000000597229
I/Rosmry  ( 3191): RosmryBizLogicItemList.c: __RecvGetItemListCb(444) > [Rosmry][RosmryBizItemList] pItemName  : Coins Pack 1

Or:

I/UnityIAP( 1538): IN: unityPurchasingRetrieveProducts([{"id":"100.gold.coins", "storeSpecificId":"000000597229", "type":"Consumable"}, {"id":"500.gold.coins", "storeSpecificId":"000000597230", "type":"Consumable"}, {"id":"sword", "storeSpecificId":"000000597246", "type":"NonConsumable"}, {"id":"subscription", "storeSpecificId":"subscription", "type":"Subscription"}])
I/UnityIAP( 1538): IN: create_search_parameter(0xB91152B0)
I/Unity  ( 1538): create_search_parameter:sItemGroupId: 100000086161
I/UnityIAP( 1538): IN: get_item_list_operation_call()
I/Unity  ( 1538): >>>>>>> IAP_SERVICE_APP_ID : org.tizen.inapppurchase.iapservice
I/Unity  ( 1538): >>>>>>> GROUP ID : 100000086161
I/Unity  ( 1538): >>>>>>> MODE : 0
I/Unity  ( 1538): >>>>>>> TRANSACTION ID : 119295
I/Unity  ( 1538): >>>>>>> START # : 1
I/Unity  ( 1538): >>>>>>> END # : 1000
I/UnityIAP( 1538): IN: free_search_parameter(0xB91152B0)
I/UnityIAP( 1538): IN: get_item_list_cb()
I/Unity  ( 1538): get_item_list_cb itemId: 000000597229 itemGroupId: (null) itemName: Coins Pack 1 currencyUnit:$ itemPrice: 4.99
I/Unity  ( 1538): get_item_list_cb itemId: 000000597230 itemGroupId: (null) itemName: Coins Pack 2 currencyUnit:$ itemPrice: 9.99
I/Unity  ( 1538): get_item_list_cb itemId: 000000597231 itemGroupId: (null) itemName: Coins Pack 3 currencyUnit:$ itemPrice: 19.99
// etc ...
I/UnityIAP( 1538): IN: unityPurchasingRetrievePurchases()
I/UnityIAP( 1538): IN: create_search_parameter(0xB9221E18)
I/Unity  ( 1538): create_search_parameter:sItemGroupId: 100000086161
I/UnityIAP( 1538): IN: get_purchased_item_list_operation_call()
I/Unity  ( 1538): Purchase list result: APP_CONTROL - No error
I/UnityIAP( 1538): IN: free_search_parameter(0xB9221E18)

I attached a complete sample log.

Questions:

  • Could it be, that the callbacks aren’t working for Tizen?
  • Is this limit to any specific country? We are located in Austria/Europe. But if so: why do we see items on the native side, but don’t get a callback from Unity?

Side notes:

  • Unity 5.4.0p4 (64-bit)
  • tizen-manifest.xml
<privileges>
  <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
  <privilege>http://tizen.org/privilege/systemsettings</privilege>
  <privilege>http://tizen.org/privilege/internet</privilege>
 </privileges>
  • Minimum API Level: Tizen 2.3
  • Installed Tizen SDK: 2.4r8
  • The app is uploaded to the beta store under the same name, bundle id, etc.
  • Logging is enabled (see the other log messages).

Thanks upfront for any feedback!

2788744–202109–TizenIabDemo4.txt (226 KB)

For the sake of completeness:
We successfully integrated the IAP solution provided by Samsung. It is highly likely that the Unity version just isn’t working.

Hi,

We are aware of this issue and a fix is available in Unity IAP 1.8.2 which is currently with QA. You can download a pre-QA copy of that release here.

Hi,

thanks for the update.

OnInitialized works in 1.8.2 RC1. However purchasing does not, at least
not in the way it is intended:

I/UnityIAP( 7073): IN: unityPurchasingPurchase([{"id":"Coins Pack 1",
"storeSpecificId":"000000597229", "type":"Consumable"}], ____)
I/UnityIAP( 7073): IN: create_search_parameter(0xB77E5D30)
I/Unity   ( 7073): create_search_parameter:sItemGroupId: 100000086161
I/UnityIAP( 7073): IN: purchase_operation_call()
I/UnityIAP( 7073): param->item_id =
I/UnityIAP( 7073): param->item_name =
E/CAPI_APPFW_APP_CONTROL( 7073): app_control.c: app_control_error(154) >
[app_control_add_extra_data] INVALID_PARAMETER(0xffffffea)
E/CAPI_APPFW_APP_CONTROL( 7073): app_control.c: app_control_error(154) >
[app_control_add_extra_data] INVALID_PARAMETER(0xffffffea)
I/Unity   ( 7073): _transactionId = 97899
I/Unity   ( 7073): _itemId =
I/Unity   ( 7073): _itemGroupId = 100000086161
I/Unity   ( 7073): _languageCd = ENG
I/Unity   ( 7073): _itemName =
E/CAPI_APPFW_APP_CONTROL( 7073): app_control.c: app_control_error(154) >
[app_control_add_extra_data] INVALID_PARAMETER(0xffffffea)
E/CAPI_APPFW_APP_CONTROL( 7073): app_control.c: app_control_error(154) >
[app_control_add_extra_data] INVALID_PARAMETER(0xffffffea)
...
I/Unity   ( 7073): Purchase request app_control SENT
I/UnityIAP( 7073): IN: free_search_parameter(0xB77E5D30)
I/Unity   ( 7073): purchase({0}): Coins Pack 1
...
I/UnityIAP( 7073): get_purchase_cb(): purchase result callback result:0
I/Unity   ( 7073): get_extra_data:: _method = OnPurchaseItemReceived
I/Unity   ( 7073): get_extra_data:: _result = 9207
I/Unity   ( 7073): get_extra_data:: _resultDescription = 6107|9207|Item
id not found
...
I/Unity   ( 7073): get_extra_data:: _timeStamp =
I/UnityIAP( 7073): get_purchase_cb(): purchase FAILED result string =
6107|9207|Item id not found
I/Unity   ( 7073):  OnPurchaseFailed JSON:
{"reason":"2","productId":"","message":"Item id not found"}
I/UnityIAP( 7073): Tizen
sendMessageToUnityUnibillManager(OnPurchaseFailed, ...)
I/Unity   ( 7073): [UnityIAP] ProcessMessage subject: OnPurchaseFailed
payload: {"reason":"2","productId":"","message":"Item id not found"}
receipt:  transactionId:
...
I/Unity   ( 7073): Failed to purchase unknown product {0}:

Apparently the item id is not passed on to the native call. If I use the
item ids as product names it does work however.

So instead of

builder.AddProduct( "at.modalog.shooter.sniper.coins0",
ProductType.Consumable, new IDs { {"000000597229", TizenStore.Name} } );

I have to write

builder.AddProduct( "0000005972292", ProductType.Consumable, new IDs {
{"000000597229", TizenStore.Name} } );

I attached the full log.

2789018–202142–TizenIabDemo8.txt (103 KB)

1 Like

Hi,

Your log indicates that that Purchase call specified that the product ID is “Coins Pack 1” while your clip here says that it is “at.modalog.shooter.sniper.coins0”. The complete log (from app start) would tell us what the store actually thinks is available but your second example (with multiple usage of the Tizen item number) isn’t necessary. The empty args in the log suggest that “Coins Pack 1” didn’t map correctly to a store-specific ID.

The sample code in IAPDemo.cs works well with normal “store independent” ID and then the store-specific Tizen ID. Note that the first arg in AddProduct is an ID (not a “name” per se.)

“Coins Pack 1” is just the publicly visible title in the purchase dialog whereas “at.modalog.shooter.sniper.coins0” is the internal key across all stores (sometimes called SKU). We never used the string “Coins Pack 1” in the code, so I presume the IAB code takes it from the GetPurchaseList() call and confuses it with the item id. “Coins Pack 1” shouldn’t map to anything.

If you can send us a log (PM is fine) showing all of the init debug that will help – we shouldn’t be seeing that name coming across as an ID. Thanks!

1 Like

Hey JayR, offtopic but I been using this official Tizen InApp: https://www.assetstore.unity3d.com/en/#!/content/40219
Before Unity released official support.

Now from experience working and adding to the official Unity application collection, have you tried official Tizen InApp as i believe it is bugged with Unity 5.4x and cant get it to work, any ideas?

@MrEsquire I have not tried their asset store version but since it was last updated in December it seems reasonable that something may have changed on their back-end that could cause problems with their plugin. Really can’t say much about what might be wrong in that version but can suggest looking at the log via SDB on a real device – there is a lot of debug getting dumped by their IAP subsystems (all of the mint, rosemary, thyme, etc. debug you see) and you can probably tell where it is breaking down from that.

1 Like

JayR, could you please confirm if your Tizen in-app purchasing implementation actually works in a released Tizen app! We just received an answer from Tizen support stating that purchasing erroneously always calls the purchasing request with the global store id instead of the users’ country specific store id.

This conflicts however with the documentation in the In-App Purchase Programming Guide

  • If MMCs can only be used in developer mode, how can I set them in the released version (aka commercial mode)?
  • If the information is optional, why do I have to set it in the released version?
  • If it actually is non-optional and there is an error in the documentation, how do I retrieve the users’ MCC and MNC [2]?

[1] This is incorrect btw as it only returns Name and MCC but no MNC.
[2] In the special case of India get_country_list also returns two stores.

1 Like

My understanding is that the MCC and MNC options described in the programming guide are for use in developer mode only and just intended to let you test what would happen with your app in a different country. As far as I know the production store-side code is using data from the device (IP address and/or SIM info) to determine which store to use and will fail if your app wasn’t set up for sale in that country. Can you confirm which countries your app has selected in the store setup? The response from Tizen Customer Service Center sounds like India and Bangladesh are working okay – can you confirm that as well?

Thanks!

This is my understanding as well but Tizen Customer Service Center claims - if I interpret them correctly - the Unity IAP is calling with the global store id all the time(?).

This could also be interpreted as “but it failed because of another reason”.

By “store setup” you mean in the seller.tizenstore.com backend? We have selected every available store of course.
Which store gets selected from the app on a purchase I have no idea. I tried to look up MCC and store ids in the tizenlog.txt but haven’t been able to find anything except for the following:

We had in-app billing integrated since mid September. The Tizen backend shows September earnings since 2016-10-06 but so far we have no earnings. Thus I guess not. We also contacted users who told us that purchasing is not working and from their answers we can confirm that purchasing is at least not working in Bangladesh. I also tried running our app on the remote test lab but the Indian server were down the other day (Update: it’s still the case today.)

Can you confirm that you have at least one released app working with Unity IAP on Tizen store?
How can I activate developer mode for Unity IAP? I was able to make a successful purchase when using Tizen IAP with developer mode activated and using the India store. But then again it was also working during Beta test.

@JayR : Can you confirm that you have at least one released app working with Unity IAP on Tizen store?

We are still having issues in getting Tizen IAP to work. Any news on this front? I also just noticed that there is no free app listed in “top grossing apps” on Tizen which makes me seriously doubt that this works for anyone?

1 Like

Tizen Top Grossing 2016-10-21

Hi,

Unity IAP is definitely working on live Tizen applications. It looks like the number of applications currently using it is fairly small, but without some specifics on how that “top grossing” list is generated we can’t really say if IAP transactions are even included.

Hi,
can you tell me a few live and released apps that use Unity IAP (or Tizen IAP extension even) which are confirmed working on the live stores. Maybe we can get in touch with the app’s developers and resolve our issue.

1 Like

Please name one app. Just one.

1 Like

I spent hour and hours using official Tizen IAP kit to get working from unity asset store, no luck, this was before the “pointless” competition they did…
They should take down the package…

“Funny” thing is, we have received 4 purchases from South Africa so far … although this is way too low, the integration somehow / somtimes seems to could work … I am not sure if it’s Unity to blame. I can also imagine, that IAP just isn’t working yet like it should.
That’s why it’d be great if Unity could name some “show case apps”, which they know got IAP integrated and working. It would be highly appreciated and would save us tons of time for further investigation.