Forum Discussion
SL_Tej
5 years agoExplorer
Quest 2: IAP.GetProductsBySKU(Skus) is returning empty
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)
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)
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:
Unity Version : 2019.4.14f1
Oculus Integration Version : 20.1
Thank you.
- 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.
10 Replies
Replies have been turned off for this discussion
- emalafeewProtegeWe 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. - SL_TejExplorerhey @virzoom
No, we still have the issue. We reached out to Oculus and probably will hear from them in a week or two. - emalafeewProtegeAfter 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. - SL_TejExplorerSo 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.- masta-yodaProtege
Specifying short and long descriptions now returns the products but the price is always 0.01. Were you able to solve this issue?
- ApprovedAnonymousWould 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.
- r0b0saruExpert Protege
Were you able to find out a way to get the correct returned price? It also just returns as 0.01 for me.
- masta-yodaProtege
Yes, there were a few issues:
1. fill in the description
2. test using an account which doesn't belong to your oculus org
3. contact support and ask them remove your app/account from some kind of promotion for in-apps, this was the ultimate fix for me which is available only from the oculus side and only they were able to fix that (the first two steps are also required)
- r0b0saruExpert Protege
thank you! I tried 1 and 2 but no change, so will try 3.
- SteveMcNelHonored Guest
Hello!
I'm having the same problem, wondering if contacting support worked for you. I have the price being displayed in a button with a callback that is at $.01. But clicking on the button will prompt the user for the correct price.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago