protected void QueryInventory() { GoogleIABManager.queryInventorySucceededEvent += OnQueryInventorySucceeded; GoogleIABManager.queryInventoryFailedEvent += OnQueryInventoryFailed; GoogleIAB.queryInventory(GetProducts()); }
void billingSupportedEvent() { UserEditor.Getsingleton.EditLog("billingSupportedEvent"); //sku : 재고 보관 단위상품을 의미 , 등록한 상품을 선언한다 GoogleIAB.queryInventory(productIDs); }
void billingSupportedEvent() { Debug.Log("billingSupportedEvent"); var skus = new string[] { "com.joywinggames.maydayaos001", "com.joywinggames.maydayaos002", "com.joywinggames.maydayaos003", "com.joywinggames.maydayaos004", "com.joywinggames.maydayaos005" }; GoogleIAB.queryInventory(skus); }
public void PurchaseItem(ButtonEventArgs args) { if (!CoreUtility.Me.ShowInternetConnection()) { return; } #if (UNITY_IOS && !STOREKIT) || (UNITY_ANDROID && !GOOGLEIAB) PopupMessages.Me.InAppNotIntegratedMessage(); return; #endif string coststring; int index; int.TryParse(args.data, out index); pID = InAppInfo[index].ID; isRestore = false; isRestoreItemSuccess = false; coststring = isProductReceived && isLocalStoreCost ? InAppInfo[index].CostStringLocaleBase : "$" + InAppInfo[index].CostUSD; MyDebug.Log("InAppManager::PurchaseItem => " + pID + ", " + index + ", " + InAppInfo[index].DisplayName + ", " + coststring); PopupMessages.Me.InAppProcessMessage(InAppInfo[index].DisplayName, coststring); #if UNITY_EDITOR PurchaseSuccessful(pID, "UnityTest_" + System.DateTime.Now.ToOADate()); return; #endif #region iOS Methods #if UNITY_IOS && !UNITY_EDITOR && STOREKIT StoreKitBinding.purchaseProduct(pID, 1); #endif #endregion #region Android => Google Play Mathods #if UNITY_ANDROID && !UNITY_EDITOR && !AMAZONSTORE && GOOGLEIAB GoogleIAB.queryInventory(inappids); #endif #endregion #region Android => Amazon Store Methods #if UNITY_ANDROID && !UNITY_EDITOR && AMAZONSTORE #if UNDERGROUND pID = pID.Replace("supercell.", "supercell.underground."); #endif if (unavailableSkus.Contains(pID)) { ItemUnavailable(pID); return; } // Construct object passed to operation as input SkuInput request = new SkuInput(); request.Sku = pID; // Call synchronous operation with input object RequestOutput response = iapService.Purchase(request); #endif #endregion }
private IEnumerator GetProductInfo(float delay) { yield return(new WaitForSeconds(delay)); GoogleIAB.queryInventory(new string[] { savedPurchase.productId }); yield break; }
void billingSupportedEvent() { if (Debug.isDebugBuild) { Debug.Log("billing supported"); } GoogleIAB.queryInventory(skus); }
// when billing is supported on the device, // this method requests IAP product data from Google/Apple private void RequestProductData() { #if UNITY_IPHONE StoreKitBinding.requestProductData(ids); #elif UNITY_ANDROID GoogleIAB.queryInventory(ids); #endif }
public override void Start() { base.Start(); Debug.Log("Android billing is starting."); SubscribeToEvents(); GoogleIAB.enableLogging(true); GoogleIAB.init(KEY); GoogleIAB.queryInventory(MarketLot.AllLots.Select(l => l.ProductAndroidIdentifier).ToArray()); }
// Accepts two arrays of product identifiers (one for iOS one for Android). All of the products you have for sale should be requested in one call. public static void requestProductData(string[] iosProductIdentifiers, string[] androidSkus, Action <List <IAPProduct> > completionHandler) { _productListReceivedAction = completionHandler; #if UNITY_ANDROID GoogleIAB.queryInventory(androidSkus); #elif UNITY_IPHONE StoreKitBinding.requestProductData(iosProductIdentifiers); #endif }
public void CheckRestoreItem() { if (!this.m_bSendQueryInventory) { string[] items = NrTSingleton <ItemMallItemManager> .Instance.GetItems(); GoogleIAB.queryInventory(items); this.m_bSendQueryInventory = true; } }
void PurchaseSucceeded(GooglePurchase purchase) { // get the sku info in order to complete logging the transaction string[] skus = { purchase.productId }; GoogleIABManager.queryInventorySucceededEvent += GetSkuInfo; GoogleIAB.queryInventory(skus); // cache the purchase to use when the skuInfo is discovered savedPurchase = purchase; }
//////////////////// A. InApp 초기화 성공 / 실패 //////////////////////////////////////////////////////////// /* InApp 초기화 성공 시 호출되는 콜백 함수. * GoogleIAB.init( key ); 실행 후 호출되는 콜백 함수. * 초기화 성공 시, 소비 요청 실패 아이템이 있는 지 확인. GoogleIAB.queryInventory(skus); */ #region void billingSupportedEvent() { Debug.Log("billingSupportedEvent"); // 초기화 성공 시, 소비 요청 실패 아이템이 있는 지 확인. GoogleIAB.queryInventory(skus); // skus 값에는 Bundle Identifier, InApp Product id 1, InApp Product id 2, InApp Product id 3... var skus = new string[] { "com.nextpiasoft.crazyword", "crazycoin1000", }; GoogleIAB.queryInventory(skus); }
public static void getItems() { string[] _idItems = new string[] { BillingItemsIDs.teeth_01, BillingItemsIDs.teeth_02, BillingItemsIDs.teeth_03, BillingItemsIDs.teeth_04 }; #if UNITY_ANDROID GoogleIAB.queryInventory(_idItems); #elif UNITY_IPHONE StoreKitBinding.requestProductData(_idItems); #endif }
private void billingSupportedEvent() { string[] items = NrTSingleton <ItemMallItemManager> .Instance.GetItems(); GoogleIAB.queryInventory(items); Debug.Log("billingSupportedEvent skus :" + items.Length); BillingManager_Google component = BillingManager_Google.Instance.GetComponent <BillingManager_Google>(); if (component != null) { component.SendQueryInventory = true; } }
void OnMouseDown() { #if UNITY_ANDROID var skus = new string[] { "csgms_remove_ads" }; GoogleIAB.queryInventory(skus); #endif #if UNITY_IOS IAP.restoreCompletedTransactions(productId => { Debug.Log("restored purchased product: " + productId); }); #endif }
// public void RestorePurchase() { if (!CoreUtility.Me.ShowInternetConnection()) { return; } #if (UNITY_IOS && !STOREKIT) || (UNITY_ANDROID && !GOOGLEIAB) PopupMessages.Me.InAppNotIntegratedMessage(); return; #endif isRestore = true; isRestoreItemSuccess = false; PopupMessages.Me.RestoreProcessMessage(); #region iOS Methods #if UNITY_IOS && STOREKIT #if !UNITY_EDITOR StoreKitBinding.restoreCompletedTransactions(); #endif #if UNITY_EDITOR ASKRestoreTransactionsFailed("Not works in editor mode"); #endif #endif #endregion // #region Android => Google Play Mathods #if UNITY_ANDROID && !AMAZONSTORE && GOOGLEIAB #if !UNITY_EDITOR GoogleIAB.queryInventory(inappids); #endif #if UNITY_EDITOR IABQueryInventoryFailed("Not works in editor mode"); #endif #endif #endregion // #region Android => Amazon Store Methods #if UNITY_ANDROID && !UNITY_EDITOR && AMAZONSTORE #if !UNITY_EDITOR ResetInput resetInput = new ResetInput(); resetInput.Reset = false; iapService.GetPurchaseUpdates(resetInput); #endif #if UNITY_EDITOR MarketPlaceNotSuported(); #endif #endif #endregion }
void billingSupportedEvent() { Debug.Log("billingSupportedEvent"); //Try to Get Item Inven #if (UNITY_ANDROID) string[] skus = new string[mGoldList.Count]; int i = 0; foreach (ShopGoldInfo info in mGoldList) { skus[i++] = info.productCode; } GoogleIAB.queryInventory(skus); #endif }
public void RequestProductList(string productIdentifiers) { string[] skus = productIdentifiers.Split(','); #if PURCHASE_USE_APPLE_ITUNES_PRIME31 StoreKitBinding.requestProductData(skus); #elif PURCHASE_USE_AMAZON_PRIME31 AmazonIAP.initiateItemDataRequest(skus); #elif PURCHASE_USE_GOOGLE_PLAY_PRIME31 GoogleIAB.queryInventory(skus); #else // Web/PC Debug.Log("skus" + skus.ToJson()); #endif }
public static void queryInvntoryFromIAB(string[] skus) { if (!isBillingSupported) { Debug.Log("google billing is not supported"); return; } if (purchaseIds.Count == 0) { purchaseIds.AddRange(skus); } lossLists.Clear(); Debug.Log("CyouPayManager queryInvntoryFromIAB"); GoogleIAB.queryInventory(skus); }
void billingSupportedEvent() { //DialogueMgr.ShowDialogue("billing", "this device can be purchasement", DialogueMgr.DIALOGUE_TYPE.Alert, null); Debug.Log("billingSupportedEvent"); //Try to Get Item Inven #if (UNITY_ANDROID) string[] skus = new string[getruby.Response.data.Count]; int i = 0; foreach (ItemShopRubyInfo info in getruby.Response.data) { skus[i++] = info.productCode; } GoogleIAB.queryInventory(skus); #endif }
// Use this for initialization void Start() { canRestored = false; // array of product ID's from iTunesConnect. MUST match exactly what you have there! #if UNITY_IOS StoreKitManager.autoConfirmTransactions = true; var productIdentifiers = new string[] { Constants.PRODUCT_ID }; StoreKitBinding.requestProductData(productIdentifiers); #elif UNITY_ANDROID var skus = new string[] { Constants.PRODUCT_ID }; // var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); #endif HZIncentivizedAd.SetDisplayListener(videoAdListener); GameInit(); }
void SetupPurchases() { Debug.Log("KongStoreKitDemo: Setting up purchases..."); #if UNITY_IPHONE Debug.Log("KongStoreKitDemo: requesting products"); StoreKitBinding.requestProductData(new string[] { "com.kongregate.mobile.games.angryBots.t05_coins" }); #elif UNITY_ANDROID GoogleIABManager.billingSupportedEvent += () => { Debug.Log("KongStoreKitDemo: billing is supported query inventory"); mPurchaseReady = true; var skus = new string[] { "com.kongregate.android.games.angrybots.t03_hard" }; GoogleIAB.queryInventory(skus); }; GoogleIABManager.queryInventorySucceededEvent += (purchases, skus) => { Debug.Log("KongStoreKitDemo: queryInventory succeeded"); foreach (GooglePurchase purchase in purchases) { Debug.Log("KongStoreKitDemo: queryInventory succeeded: " + purchase.productId); verifyGoogleReceipt(purchase); } }; GoogleIABManager.queryInventoryFailedEvent += (sku) => { Debug.Log("KongStoreKitDemo: queryInventoryFailedEvent: " + sku); }; GoogleIABManager.purchaseSucceededEvent += purchase => { Debug.Log("Google IAB callback - purchased product: " + purchase); verifyGoogleReceipt(purchase); }; GoogleIABManager.purchaseFailedEvent += message => { Debug.Log("Google IAB callback - purchase failed: " + message); KongregateAPI.GetAPI().Analytics.FinishPurchase(KongregateAPI.PURCHASE_FAIL, message, getPurchaseFields()); mPurchaseReady = true; }; GoogleIABManager.consumePurchaseSucceededEvent += purchase => { Debug.Log("KongStoreKitDemo: Google IAB callback - consume succeeded: " + purchase); }; GoogleIABManager.consumePurchaseFailedEvent += message => { Debug.Log("Google IAB callback - consume failed: " + message); }; GoogleIAB.init(_GooglePublicKey); #elif UNITY_WEBPLAYER || UNITY_WEBGL mPurchaseReady = true; #endif }
//TODO private void QueryInventory() { //Add Original Skus Here List <string> prodIDs = new List <string>(); for (int i = 0; i < mInAppProducts.Count; i++) { prodIDs.Add(mInAppProducts[i].IAP_Id); } string[] skus = prodIDs.ToArray(); #if UNITY_ANDROID GoogleIAB.queryInventory(skus); #endif #if UNITY_IOS StoreKitBinding.requestProductData(skus); #endif }
void Init() { GoogleIABManager.billingSupportedEvent += billingSupportedEvent; GoogleIABManager.billingNotSupportedEvent += billingNotSupportedEvent; GoogleIABManager.queryInventorySucceededEvent += queryInventorySucceededEvent; GoogleIABManager.queryInventoryFailedEvent += queryInventoryFailedEvent; GoogleIABManager.purchaseCompleteAwaitingVerificationEvent += purchaseCompleteAwaitingVerificationEvent; GoogleIABManager.purchaseSucceededEvent += purchaseSucceededEvent; GoogleIABManager.purchaseFailedEvent += purchaseFailedEvent; GoogleIABManager.consumePurchaseSucceededEvent += consumePurchaseSucceededEvent; GoogleIABManager.consumePurchaseFailedEvent += consumePurchaseFailedEvent; var key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiAuaxUVegwS7YpWKYta7BluTgyLuh9wMR/ThKaVh8saH7Xl/eK0of3ilILzc/cs9LhW07uQeijQmxcMTiZI8pO5TfHuQCNSUZoK9dXJ1W0AzAj4He+Ur/XNEI3w0XSEUKAxQiFTbZ5x1/IoKH7LnvFWNqTKOmdRVSh45+G11qguABmHiT4PS0YTuUEfij1N4pkzJtNnfvTpwkx9mnCuO1e38659moGihHcwviKlv0W2ddb8te28iv5UxWSR2h9SWqHpjYFfv2Y2V9s1+F0MLb1fwbreAFocqmE+bHhV/oHVLBRv3Qsuwqej9CwRWU6YAwefjxmt0tEeDwHn2DF7gWQIDAQAB"; GoogleIAB.init(key); var skus = new string[] { "one.coin", "nineteen.coin", "three.coin", "five.coin", "nine.coin", "intotheblack.vip", "intotheblack.venus", "intotheblack.shield" }; GoogleIAB.queryInventory(skus); }
/// <summary> /// 팝업창 초기화 /// </summary> void InitPopupList() { #if UNITY_ANDROID GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore01_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore02_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore03_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore04_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore05_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore06_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore07_test"); GoogleIAB.consumeProduct("com.appsgraphy.kvsskakao.popupstore08_test"); var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); #endif dicMenuList["PopupScoutPlayers"].SetActive(false); dicMenuList["PopupBuySoccerGloves"].SetActive(false); dicMenuList["PopupBuySoccerShoe"].SetActive(false); dicMenuList["PopupCardMixLuckTicket"].SetActive(false); dicMenuList ["PopupCardMixGradeReserveTicket"].SetActive(false); dicMenuList["PopupBuyEventCash"].SetActive(false); dicMenuList["PopupBuyPlayTimeaWeek"].SetActive(false); dicMenuList["PopupBuyPlayTimeaMonth"].SetActive(false); dicMenuList["PopupBuy_pop"].SetActive(false); dicMenuList["PopupExit_pop"].SetActive(false); }
public override void Start() // Imsi { //Purchase = PurchaseType.Nstore; Ag.LogIntenseWord(" MenuManager Started ..... "); //mGameMatchOk = false; Ag.SingleTry = 0; Ag.CurrentScene = "MENU"; //-----------Popup Cash Item int ran = AgUtil.RandomInclude(1, 999); //if (Ag.mySelf.MinutesAfterRegist > 1440 && ran % 5 < 5) // 100 % @ 411 Ag.ContGameNum = 0; mBackDepthFlag = false; MailItemInit(); InitInAppPurchaseIOSnADR(); mFriendId = ""; Ag.mySelf.SetCostumeToCard(); //FriendRank (); mwas = new WasCard(); mCard = new AmCard(); mRankFriend = new WasRank(); BarObj = new List <GameObject> (); mTimeLooseAtStartPoint = 0f; Ag.LogIntenseWord(" MenuManager :: Start .. Game Init () "); LoadMenuResources(); SettingLocal(); // '킥오프' 주황색 버튼 BtnKickOff.MakeAbility(true); // BtnKickOff.SetObjectsWithAlt ( FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready2", false), null, // FindMyChild (dicMenuList ["Ui_kickoff"], "Panel_bottom/bundle_rightbtn/btn1_ready", true)); if (Ag.mGuest) { Ag.mySelf.WAS.profileURL = ""; Ag.mySelf.WAS.KkoNick = "No name"; Ag.mySelf.KkoNickEncode = "No name"; } else { Ag.mySelf.WAS.profileURL = StcPlatform.ProfileURL; Ag.mySelf.WAS.KkoNick = StcPlatform.PltmNick; Ag.mySelf.KkoNickEncode = WWW.EscapeURL(StcPlatform.PltmNick); Ag.mySelf.TeamNameEncoded = WWW.EscapeURL(Ag.mySelf.WAS.TeamName); } if (PreviewLabs.PlayerPrefs.GetBool("DidTutorial")) { AgStt.mgGameTutorial = false; } else { AgStt.mgGameTutorial = true; } #if UNITY_EDITOR PreviewLabs.PlayerPrefs.SetBool("DidTutorial", true); AgStt.mgGameTutorial = false; #endif //GitIgnoreThis.GitIgnoreTutorial (); addsendmessageTutorPanel(); Ag.LogIntenseWord(" MenuManager :: Start .. for "); for (int i = 0; i < KakaoFriends.Instance.appFriends.Count; i++) { if (i == KakaoFriends.Instance.appFriends.Count - 1) { mFriendId += KakaoFriends.Instance.appFriends [i].userid; } else { mFriendId += KakaoFriends.Instance.appFriends [i].userid + ","; } Debug.Log(mFriendId); } Kick_OffInit(); PriceSetting(); SetNodeDelegate(); Ag.LogIntenseWord(" MenuManager :: Start .. Sale Item "); SaleItemSetting(); //pushSetting (); Ag.mViewCard.CardLeagueSpritename(Ag.mySelf.WAS.League); Ag.LogIntenseWord(" MenuManager :: Start .. spriteName " + Ag.mySelf.WAS.League + Ag.mViewCard.LeagueSpriteNameS); dicMenuList ["Lobby_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; dicMenuList ["Ui_team_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; dicMenuList ["MY_Label_division"].GetComponent <UISprite> ().spriteName = Ag.mViewCard.LeagueSpriteNameS; // Debug.Log (GiftRewardCode()+" gift"); #if UNITY_ANDROID var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); #endif Ag.mySelf.ApplyCurrentDeck(); Ag.LogIntenseWord(" MenuManager :: Start .. End .... "); //ShowDeckEffLabel (); InitFriendRank(); if (Ag.mGameStartAlready) { Btn_Fun_MatchRequire(); PopupAfterGameEnd(); if (Ag.mBlueItemFlag) { StartCoroutine(btn_auto_label_Priceoff()); } } else { if (Ag.mySelf.MinutesAfterRegist > 60 && ran % 20 == 3) // 5% ... // ran % 5 < 5) // 100 % @ 411 { PopupAfterUserCash(); } BannerEventAction(); // if (!PreviewLabs.PlayerPrefs.GetBool ("FirstCharge_check")) { // dicMenuList ["Ui_popup"].SetActive (true); // dicMenuList ["first_purchase"].SetActive (true); // } } }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #if UNITY_ANDROID public void CallAndroidQueryInventory() { var androidSkus = new string[] { item1, item2, item3, item4 }; GoogleIAB.queryInventory(androidSkus); }
public void QueryInventory() { #if UNITY_ANDROID GoogleIAB.queryInventory(inapKeys); #endif }
void OnGUI() { beginColumn(); if (GUILayout.Button("Initialize IAB")) { var key = "your public key from the Android developer portal here"; key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmffbbQPr/zqRjP3vkxr1601/eKsXm5kO2NzQge8m7PeUj5V+saeounyL34U8WoZ3BvCRKbw6DrRLs2DMoVuCLq7QtJggBHT/bBSHGczEXGIPjWpw6OQb24EWM0PaTRTH2x2mC/X6RwIKcPLJFmy68T38Eh0DXnF4jjiIoaD0W8AYLjLzv0WvbIfgtJlvmmwvI2/Kta1LRnW3/Ggi5jb9UmXZAUIBz8kQtSH5FUCmFOQHMzekfg8rQ4VO1nlWhnB58UPwsxWt/DNyDfqv2VMeA2+VJG0fkiMl/6vWA7+ianVTU3owXcvxJHseEDUVYo1wEKfhK7ErGB7sxDJx5wHXAwIDAQAB"; GoogleIAB.init(key); } if (GUILayout.Button("Query Inventory")) { // enter all the available skus from the Play Developer Console in this array so that item information can be fetched for them var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); } if (GUILayout.Button("Are subscriptions supported?")) { Debug.Log("subscriptions supported: " + GoogleIAB.areSubscriptionsSupported()); } if (GUILayout.Button("Purchase Test Product")) { GoogleIAB.purchaseProduct("android.test.purchased"); } if (GUILayout.Button("Consume Test Purchase")) { GoogleIAB.consumeProduct("android.test.purchased"); } if (GUILayout.Button("Test Unavailable Item")) { GoogleIAB.purchaseProduct("android.test.item_unavailable"); } endColumn(true); if (GUILayout.Button("Purchase Real Product")) { GoogleIAB.purchaseProduct("com.prime31.testproduct", "payload that gets stored and returned"); } if (GUILayout.Button("Purchase Real Subscription")) { GoogleIAB.purchaseProduct("com.prime31.testsubscription", "subscription payload"); } if (GUILayout.Button("Consume Real Purchase")) { GoogleIAB.consumeProduct("com.prime31.testproduct"); } if (GUILayout.Button("Enable High Details Logs")) { GoogleIAB.enableLogging(true); } if (GUILayout.Button("Consume Multiple Purchases")) { var skus = new string[] { "com.prime31.testproduct", "android.test.purchased" }; GoogleIAB.consumeProducts(skus); } endColumn(); }
void OnGUI() { beginColumn(); if (GUILayout.Button("Initialize IAB")) { var key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr4RxjBkG9CEW7Z/ug+F739LXkLiTO6+Igv/2h4WqsYzLUzJJC0RBG4EsKT5LepByCSZ3AD+mBIe13kKQJisLmgtlTspkiEwCqX+oJEpm7FN2iRZX9h7EtE/p/2B2K/hFCUJqe44nliRwUhnmTo7+5v8jy2osNASATAwU4CWr+RlCZ+DnWiDM0WqnIqSiSkluSnay4zYfKzD9zsv7tfj1EYyV96RefYDV+xaBP7F43z9//SfZ5EwNtt/pjzY3y/F5hOCY0YM2foMp5JELZOHHLtTFXMtBvuO5RW62ze+h10T1kcwWAzf19aXHr3AwuKByD94C5ghPVUm/p4M1ZXdEAwIDAQAB"; //key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmffbbQPr/zqRjP3vkxr1601/eKsXm5kO2NzQge8m7PeUj5V+saeounyL34U8WoZ3BvCRKbw6DrRLs2DMoVuCLq7QtJggBHT/bBSHGczEXGIPjWpw6OQb24EWM0PaTRTH2x2mC/X6RwIKcPLJFmy68T38Eh0DXnF4jjiIoaD0W8AYLjLzv0WvbIfgtJlvmmwvI2/Kta1LRnW3/Ggi5jb9UmXZAUIBz8kQtSH5FUCmFOQHMzekfg8rQ4VO1nlWhnB58UPwsxWt/DNyDfqv2VMeA2+VJG0fkiMl/6vWA7+ianVTU3owXcvxJHseEDUVYo1wEKfhK7ErGB7sxDJx5wHXAwIDAQAB"; GoogleIAB.init(key); } if (GUILayout.Button("Query Inventory")) { // enter all the available skus from the Play Developer Console in this array so that item information can be fetched for them var skus = new string[] { "com.prime31.testproduct", "android.test.purchased", "com.prime31.managedproduct", "com.prime31.testsubscription" }; GoogleIAB.queryInventory(skus); } if (GUILayout.Button("Are subscriptions supported?")) { Debug.Log("subscriptions supported: " + GoogleIAB.areSubscriptionsSupported()); } if (GUILayout.Button("Purchase Test Product")) { GoogleIAB.purchaseProduct("test003"); } if (GUILayout.Button("Consume Test Purchase")) { GoogleIAB.consumeProduct("test003"); } if (GUILayout.Button("Test Unavailable Item")) { GoogleIAB.purchaseProduct("android.test.item_unavailable"); } endColumn(true); if (GUILayout.Button("Purchase Real Product")) { GoogleIAB.purchaseProduct("com.prime31.testproduct", "payload that gets stored and returned"); } if (GUILayout.Button("Purchase Real Subscription")) { GoogleIAB.purchaseProduct("com.prime31.testsubscription", "subscription payload"); } if (GUILayout.Button("Consume Real Purchase")) { GoogleIAB.consumeProduct("com.prime31.testproduct"); } if (GUILayout.Button("Enable High Details Logs")) { GoogleIAB.enableLogging(true); } if (GUILayout.Button("Consume Multiple Purchases")) { var skus = new string[] { "com.prime31.testproduct", "android.test.purchased" }; GoogleIAB.consumeProducts(skus); } endColumn(); }