/// <summary> /// Purchases the button. /// </summary> /// <param name="obj">Object.</param> public void PurchaseButton(GameObject obj) { Debug.Log("purchase button tap"); if (m_singletonListener != null) { var product = m_singletonListener.GetProductInfo(obj.name); if (product != null && product.availableToPurchase) { _loadingOverlay.SetActive(true); AES256Cipher aesSet = new AES256Cipher(); string _uiid = NativeRecieveManager.GetUiid(DomainData._bundle); string payload = aesSet.AES_encrypt(_uiid + ":" + obj.name, HttpConstants.API_KEY_VALUE); m_singletonListener.InitiatePurchase(product, payload); } } }
/// <summary> /// Raises the received message event. /// </summary> /// <param name="webView">Web view.</param> /// <param name="message">Message.</param> public void OnReceivedMessage(UniWebView webView, UniWebViewMessage message) { if (!_onSchemeFlag) { _onSchemeFlag = true; string loadUrl = message.args ["url"]; //ブラウザ起動 loadUrl = new AES256Cipher().AES_decrypt(loadUrl, HttpConstants.API_KEY_VALUE); #if !UNITY_EDITOR && UNITY_ANDROID AndroidOpenUrl(loadUrl); #else Application.OpenURL(loadUrl); #endif _onSchemeFlag = false; } }