Created
August 4, 2020 06:34
-
-
Save gmYusuf/8fc868932ba6ed06c4da0d4db88baf95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ObtainProductConsumablesInfo(IList<string> productIdConsumablesList) | |
{ | |
if (iapAvailable != true) | |
{ | |
OnObtainProductInfoFailure?.Invoke(IAP_NOT_AVAILABLE); | |
return; | |
} | |
ProductInfoReq productInfoReq = new ProductInfoReq | |
{ | |
PriceType = 0, | |
ProductIds = productIdConsumablesList | |
}; | |
iapClient.ObtainProductInfo(productInfoReq).AddOnSuccessListener((type0) => | |
{ | |
Debug.Log("[HMSPlugin]:" + type0.ErrMsg + type0.ReturnCode.ToString()); | |
Debug.Log("[HMSPlugin]: Found " + type0.ProductInfoList.Count + "consumable products"); | |
OnObtainProductInfoSuccess?.Invoke(new List<ProductInfoResult> { type0}); | |
}).AddOnFailureListener((exception) => | |
{ | |
Debug.Log("[HMSPlugin]: ERROR Consumable ObtainInfo" + exception.Message); | |
OnObtainProductInfoFailure?.Invoke(exception); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment