Amazon: Unavailable product

UnityIAP version 1.22.0, Unity 2017.4.29f1

Create empty project with ony one plug-in: UnityIAP
Google Play store test application works fine.

Amazon Store.
Unity console shows: “Unavailable product” for each product.

Logcat shows nothing interesting (Unity tag):
“onGetUserIdResponse…”
“Requesting 1 groups of skus”
“onItemDataResponse…”
“onPurchaseUpdatesRespose…”
“Unavailable product…”

Anyone manage to work Amazon with UnityIAP?
I check and re-check everything 5 times or more… No ideas and nothing helps.
Almost no information at amazon or Unity forum about bags - everything working (except for me))))

This may help Unity - Manual: Configuration for the Amazon Appstore

Jeff, integration is very simple…

I have in logcat:

Unity Purchasing Amazon
onPurchaseUpdatesRespose

(it comes from Unity activity, but only seen in native device log, not in Unity log)

Could you tell me please, does this line in log means that plug-in correctly initialized and get response from Amazon store correctly?

Please put debug code in your OnInitialized callbacks to confirm. Debug.Log statements will show in logcat

Jeff, I am using IAP Demo scene from plug-in

In unity OnInitializeFailed() called. In console:
“Billing failed to initialize!”;
“No products available for purchase!”;

But the question asked was DIFFERENT that you answered.

When these lines printed to devices log by Unity IAP?

Unity Purchasing Amazon
onPurchaseUpdatesRespose

I was encouraging you to review the documentation and debug. We haven’t tested on Amazon for some time. You can’t initialize IAP in the Editor, you can only use the fake store. You need to install on a device.

the problem is in Amazon…

In app purchases do not work in live testing and sandbox.
In app purchases work in approved build that goes live.

3 Likes

Were you able to figure out this issue? We are getting “Unavailable product” when initialization happens even though we have the proper items created in the Amazon Appstore dashboard.

Have you tested on Amazon lately? We are getting “Unavailable product” and IAP are failing.

Yes we tested recently and it worked perfectly for me, first time. I used the Sample IAP Project v2 and followed these steps Unity - Manual: Configuration for the Amazon Appstore Please describe your steps to reproduce.

Thanks for the response! Did it work on device with a valid Appstore configuration?

I’m not sure what you mean, I tested on an Amazon Fire tablet.

Yes I just meant did you test using IAP that you created in your Amazon Appstore dashboard?

When we call the below method we get the following error when building the APK:

UnityEditor.Purchasing.UnityPurchasingEditor.TargetAndroidStore(UnityEngine.Purchasing.AppStore.AmazonAppStore);

The type or namespace name ‘Purchasing’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)

IAP would not be expected to work if it doesn’t compile. Purchasing is not in UnityEditor, it’s in UnityEngine. You switch the target platform from the menu option in the Unity Editor, not in code. Please compare to the Sample IAP Project v2 here https://discussions.unity.com/t/700293/3

Yes of course I understand IAP would not work if we can’t compile the APK, since we wouldn’t even have an APK to run on the device. But since it was not working via using the switch the target platform menu option. We followed the instructions here:

https://docs.unity3d.com/Manual/UnityIAPAmazonConfiguration.html

Is that method call no longer supported?

Why wasn’t it working when you used the menu? Sorry I don’t follow. Your error is separate from “switching platforms”. What Amazon device are you testing on?

“Why wasn’t it working when you used the menu?” When we built the APK but only switching the target via the menu, we would get the “Unavailable product” on our Amazon Kindle Fire when we tried to use the IAP functionality. So I thought maybe we need to switch the target via the code as in the documentation.

It appears the code in the documentation is obsolete. Because the same error also happens when I use it in your sample project. It would be nice if it worked so that we do not need to build a separate APK for Amazon and Google Play.

Assets/Scripts/MyIAPManager.cs(38,9): error CS0234: The type or namespace name ‘Purchasing’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)

Yes, your issue is separate from switching targets, just use the menu option. I would expect the behavior to be the same if you have not properly published your app.

Is the documentation going to be fixed?