private void RequestPurchaseAndroid() { global::Debug.Log("================================================= STORE PP_CALLBACK --> TO SV VERIFY !!"); StoreUtil.StoreProductInfo spi = this.GetStoreProductInfo_ByProductId(this._productId); GameWebAPI.RequestSH_PurchaseAndroid requestSH_PurchaseAndroid = new GameWebAPI.RequestSH_PurchaseAndroid(); requestSH_PurchaseAndroid.SetSendData = delegate(GameWebAPI.SH_Req_Verify_AND param) { param.productId = this._productId; param.osVersion = DataMng.Instance().RespDataCM_Login.playerInfo.osType; if (spi != null) { param.currencyCode = spi.priceCurrencyCode; param.countryCode = spi.countryCode; } else { param.currencyCode = "JPY"; param.countryCode = string.Empty; } param.priceNumber = this.GetPriceFromProductId(this._productId); param.priceAmount = this.GetStorePriceFromProductId(this._productId).ToString(); param.signature = this.reqList[0]; param.signedData = this.reqList[1]; }; requestSH_PurchaseAndroid.OnReceived = delegate(GameWebAPI.RespDataSH_ReqVerify response) { DataMng.Instance().RespDataSH_ReqVerify = response; }; GameWebAPI.RequestSH_PurchaseAndroid request = requestSH_PurchaseAndroid; base.StartCoroutine(request.RunOneTime(new Action(this.VerifyReceiptSuccess), new Action <Exception>(this.VerifyReceiptFailed), null)); }
public double GetStorePriceFromProductId(string productId) { global::Debug.Log("★productId : " + productId); StoreUtil.StoreProductInfo storeProductInfo_ByProductId = this.GetStoreProductInfo_ByProductId(productId); if (storeProductInfo_ByProductId != null) { global::Debug.Log(string.Format("info {0}\ntitle : {1}\nprice : {2}\npriceAmountMicros : {3}", new object[] { storeProductInfo_ByProductId, storeProductInfo_ByProductId.title, storeProductInfo_ByProductId.price, storeProductInfo_ByProductId.priceAmountMicros })); double num = double.Parse(storeProductInfo_ByProductId.priceAmountMicros); return(num / 1000000.0); } global::Debug.Log("info null..."); return(0.0); }
private void consumeProductCallBackSuccess() { int numFromProductId = this.GetNumFromProductId(this._productId); if (Loading.IsShow()) { RestrictionInput.EndLoad(); } if (GUIMain.IsBarrierON()) { GUIMain.BarrierOFF(); } CMD_ModalMessage cmd_ModalMessage = (CMD_ModalMessage)GUIMain.ShowCommonDialog(delegate(int x) { if (this.actCallBackReConsume != null) { this.actCallBackReConsume(true); } if (Loading.IsShow()) { Loading.ResumeDisplay(); } if (GUIMain.IsBarrierON()) { GUIMain.BarrierON(null); } }, "CMD_ModalMessage", null); StoreUtil.StoneStoreData stoneStoreDataFromProductId = this.GetStoneStoreDataFromProductId(this._productId); if (!this.isFromStart) { cmd_ModalMessage.Title = StringMaster.GetString("ShopRestoreTitle"); cmd_ModalMessage.Info = StringMaster.GetString("ShopRestoreInfo"); } else { if (!stoneStoreDataFromProductId.packFlg) { cmd_ModalMessage.Title = StringMaster.GetString("ShopConfirmTitle"); } else { cmd_ModalMessage.Title = stoneStoreDataFromProductId.productTitle; } cmd_ModalMessage.Info = string.Format(StringMaster.GetString("ShopCompleted"), numFromProductId.ToString()); } if (this.isFromStart) { DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point += numFromProductId; GUIPlayerStatus.RefreshParams_S(false); } else { if (DataMng.Instance().RespDataUS_PlayerInfo != null) { DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point += numFromProductId; } GUIPlayerStatus.RefreshParams_S(false); } StoreUtil.StoreProductInfo storeProductInfo_ByProductId = this.GetStoreProductInfo_ByProductId(this._productId); string currency = "JPY"; if (storeProductInfo_ByProductId != null) { currency = storeProductInfo_ByProductId.currencyCode; } AdjustWrapper.Instance.TrackEvent(AdjustWrapper.EVENT_ID_SEND_PAYMENT, this.GetStorePriceFromProductId(this._productId), currency); GUICollider.EnableAllCollider("StoreUtil"); }