Hello ! @BBO_Lagoon , we do not currently cover this BillingClient.BillingResponseCode (3)
BILLING_UNAVAILABLE
Examples where this error may occur:
The Play Store app on the user’s device is out of date.
The user is in an unsupported country.
The user is an enterprise user and their enterprise admin has disabled users from making purchases.
Google Play is unable to charge the user’s payment method.
Letting the user retry may succeed if the condition causing the error has changed (e.g. An enterprise user’s admin has allowed purchases for the organization).
Constant Value: 3 (0x00000003)
Hello,
No problem.
They are 2 different things : BILLING_UNAVAILABLE is an error code sent by google. PurchaseFailureReason.PurchasingUnavailable is an error in the IAP SDK that can be caused by things like:
BILLING_UNAVAILABLE or any non-ok (success**)** code sent by google while handling google billing purchase flow.
InitiatePurchase(string productID) being called with a null IStoreController in CodelessIAPStoreListener.
In brief, BILLING_UNAVAILABLE can cause a PurchaseFailureReason.PurchasingUnavailable.
In our implementation of com.android.billingclient.api.PurchasesUpdatedListener#onPurchasesUpdated if the result sent by google is a result with a responseCode OK (success) but with an empty list of purchases, we internally handle it as en error. and give the PurchaseFailureReason.Unknown since it is our catchall FailureReason.
When we receive a success result from google, but the Purchase.PurchaseState is not PENDING or PURCHASED we handle it as an error and give the PurchaseFailureReason.Unknown. Here’s the google doc on the subject.
They are some other error edge cases that we internally handle with the PurchaseFailureReason.Unknown Like your situation.
In your case, with the code M: GPUL.HEC I can tell you that you are getting this FailureReason because the code received was BILLING_UNAVAILABLE and it falls in our “catchall” FailureReason in our implementation ofonPurchasesUpdated but we still output the google result responseCode for debugging / testing purposes.
In other features implementation google’s BILLING_UNAVAILABLE can result in our sdk’s PurchaseFailureReason.PurchasingUnavailable, like i in the exemples i mentioned early in the thread.
I’m having the same problem, but none of these descriptions for Billing Unavailable make sense to me, I’ve tested on different devices with different accounts and I’m still having the same problem, I’m refusing to believe that this isn’t an incompatibility between Unity vs Google .
Let me know if you find a solution, I’ll do the same. Regarding Google’s warning, I’m not sure if it’s related to Billing, but my problem regarding the version was resolved after Unity released the update for Unity IAP, so I was able to change the SDK target to 34 again.