Open aetiom opened 9 years ago
I'm pretty sure you can get this error from IabResult:BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;
I'm not sure that IAB result is directy accessible from purchaseFailedEvent in unity plugin. How can i access it?
Here my purchaseFaildeEvent function, that always retuns me an -1005 error code when item is already owned.
private void purchaseFailedEvent(int errorCode, string errorMessage) {
// if sku has already been purchased (error code 7)
if (errorCode == 7) {
/* unconsumable SKU */
if (_SKU_temp == SKU_NOADS) { SetNoAds(true, null); }
else if (_SKU_temp == SKU_PREMIUM) { SetPremium (true, null); }
/* consumable SKU */
else if (consumable_skuNames.Contains(_SKU_temp)) {
if (inventory.GetPurchase(_SKU_temp) != null) {
OpenIAB.consumeProduct (inventory.GetPurchase(_SKU_temp));
ShowMsg ("Consuming item");
}
else {
ShowMsg ("Unable to find purchase entry. Retry later.");
}
}
}
else {
ShowMsg ("Purchasing product error (" + errorCode + ")");
}
// clear vars
_SKU_temp = null;
Debug.LogError("purchaseFailedEvent: " + errorMessage);
}
Hello
It seems that error codes returned by purchaseFailedEvent, in unity plugin, is about IAB Helper error codes. How can i get "Billing response codes" instead of IAB Helper in unity?
IAB Helper error is not enough accurate for reach my goal. I would like to catch error like "ITEM_ALREADY_OWNED"
Regards,