cancel
Showing results for 
Search instead for 
Did you mean: 

Quest 2: IAP.GetProductsBySKU(Skus) is returning empty

tmacharla
Level 3
Hi,

We have 2 apps - one Quest and one Rift and they are both setup with the same In-App purchase items with the same SKUs.

I am using the following code to get the IAP items using the skus:
public readonly string[] Skus = { "CPTIER1", "CPTIER2", "CPTIER3", "CPTIER4" };
public void GetIapItems(Action successCallback, Action<string> failureCallback)
{
string debugStr = "**** Oculus.GetIapItems: ";
foreach (var sku in Skus)
{
debugStr += "\n" + sku;
}
Debug.Log(debugStr);

IAP.GetProductsBySKU(Skus).OnComplete(msgProductList =>
{
if (msgProductList.IsError)
{
string errorMsg = msgProductList.GetError()?.Message ?? "Error getting products by sku";
Debug.LogError("OculusGetIapItems: " + errorMsg);
failureCallback?.Invoke(errorMsg);
return;
}

OculusItems = msgProductList.GetProductList();

debugStr = "**** msgProductList.GetProductList(): " + msgProductList.GetProductList().Count;
foreach (var oculusItem in OculusItems)
{
debugStr += "\n" + oculusItem.Sku + " -- " + oculusItem.Name + " -- " + oculusItem.FormattedPrice;
}
Debug.Log(debugStr);

successCallback?.Invoke();
});
}

In Unity Editor, it uses the Rift app id and gets the items successfully. Tested it with a windows build as well and it gets the 4 items requested.


Issue:

In android build on Quest 2 however, there is no error and it just returns empty list when all 4 items are requested. The debug log prints this:
12-09 17:27:26.046  6163  6184 I Unity   : **** Oculus.GetIapItems:
12-09 17:27:26.046  6163  6184 I Unity   : CPTIER1
12-09 17:27:26.046  6163  6184 I Unity   : CPTIER2
12-09 17:27:26.046  6163  6184 I Unity   : CPTIER3
12-09 17:27:26.046  6163  6184 I Unity   : CPTIER4
12-09 17:27:26.046  6163  6184 I Unity   :
12-09 17:27:26.046  6163  6184 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
12-09 17:27:26.046  6163  6184 I Unity   :
12-09 17:27:26.095  6163  6184 I Unity   : **** msgProductList.GetProductList(): 0
12-09 17:27:26.095  6163  6184 I Unity   :
12-09 17:27:26.095  6163  6184 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

If I request only the first 2 SKUs, "CPTIER1", "CPTIER2"  then it returns them correctly. Except for these 2 items, requesting 3 or all 4 items, it returns empty.
12-09 17:42:07.409  6862  6883 I Unity   : **** Oculus.GetIapItems:
12-09 17:42:07.409  6862  6883 I Unity   : CPTIER1
12-09 17:42:07.409  6862  6883 I Unity   : CPTIER2
12-09 17:42:07.409  6862  6883 I Unity   :
12-09 17:42:07.409  6862  6883 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
12-09 17:42:07.409  6862  6883 I Unity   :
12-09 17:42:07.578  6862  6883 I Unity   : **** msgProductList.GetProductList(): 2
12-09 17:42:07.578  6862  6883 I Unity   : CPTIER1 -- Currency 1 -- C$1.19
12-09 17:42:07.578  6862  6883 I Unity   : CPTIER2 -- Currency 2 -- C$5.79
12-09 17:42:07.578  6862  6883 I Unity   :
12-09 17:42:07.578  6862  6883 I Unity   : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Oculus Quest In-App items on the dashboard:
xase5d8wlr70.png

Unity Version  : 2019.4.14f1
Oculus Integration Version : 20.1

Thank you.
1 ACCEPTED SOLUTION

Accepted Solutions

virzoom
Level 4
After filling out both descriptions and all of the art assets except the trailer our skus appeared!

We had assumed those were just needed when submitting to the Store but looks like they are necessary even for off-Store IAP.  

View solution in original post

6 REPLIES 6

virzoom
Level 4
We have the same issue on Quest, have you made any progress?

We're on Unity 2019.4.1f1 and have tried with 20.1 and 23.1 Oculus integrations.

tmacharla
Level 3
hey @virzoom

No, we still have the issue. We reached out to Oculus and probably will hear from them in a week or two.

virzoom
Level 4
After filling out both descriptions and all of the art assets except the trailer our skus appeared!

We had assumed those were just needed when submitting to the Store but looks like they are necessary even for off-Store IAP.  

View solution in original post

tmacharla
Level 3
So we heard back from Oculus devs and the temporary solution that they suggested was to add the Descriptions (Short and Long) to all the IAP items on the dashboard for them to be returned properly.

And adding the description worked. We are getting all 4 IAP items in the build.

Although, now we are getting the Price of 2 of the items as $0.01 even though they were set to $9.99 and $19.99 respectively.

Memagonewild
Level 2
Would someone build an okey game?  I just found this forum by searching for "who are Oculus developers", so I thought I'd throw the idea out there.  Picking up the domino-like okey tiles and placing them might take some time to build, but I know it would sell.  

Specifying short and long descriptions now returns the products but the price is always 0.01. Were you able to solve this issue?