Hello,
I am having some trouble initializing purchasing for Amazon. Previously we used Unity IAP 4.1.5 with Unity 2020.3.16f1, targeting Android API 30 w/ Gradle 4.0.
Now for the google billing deprecation we have updated these values to Unity IAP 4.5.2, Unity 2020.3.16f1, targeting Android API 32 w/ Gradle 7.0.2.
I get “PurchasingUnavailable” in my new builds; I have not changed anything regarding my purchasing initialization. I do not use codeless Unity IAP.
Everything works for Android and iOS, it is only Amazon that gives me the “PurchasingUnavailable” message.
Edit: I have found the issue to be the BillingMode.json. If I manually change it to target Amazon, purchasing initializes properly (however, it does take ~20 seconds).
My new problem is how to change the BillingMode during build time. I did try setting the android store in my build script but that did not work.
UnityPurchasingEditor.TargetAndroidStore(AppStore.AmazonAppStore);
UnityPurchasingEditor.TargetAndroidStore(AppStore.AmazonAppStore);