public void wxBuy() { _shopData = GetShopItem(_itemID); if (_shopData == null) { return; } int payTag = 1; if (payTag == 1 && VX_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("微信支付通道暂时关闭", TextColor.RED); return; } GameObject sceneObj = GameObject.Find("Scene"); if (sceneObj) { StartUpScene startUpMono = sceneObj.GetComponent <StartUpScene>(); if (startUpMono != null) { startUpMono.startIOSWxPay(payTag, (int)_shopData.cost_list[0].cost_num, (int)_shopData.id, TextUtils.GetString(_shopData.name), TextUtils.GetString(_shopData.name)); } } }
private void buyItem(GameObject go) { PrintNeed(); #if UNITY_EDITOR UtilTools.ShowMessage("PC版不提供充值服务", TextColor.RED); return; #endif if (SDKManager.IsOfficialPay()) { ComponentData componentdata = ComponentData.Get(go); int payTag = (int)componentdata.Tag; if (payTag == 1 && _ctrl.VX_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("微信支付通道暂时关闭", TextColor.RED); return; } if (payTag == 2 && _ctrl.ZFB_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("支付宝支付通道暂时关闭", TextColor.RED); return; } StartCoroutine("startAndroidOfficialPay", componentdata.Tag); } else { if (version.VersionData.IsReviewingVersion()) { return; } else { ComponentData componentdata = ComponentData.Get(go); int payTag = (int)componentdata.Tag; if (payTag == 1 && _ctrl.VX_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("微信支付通道暂时关闭", TextColor.RED); return; } if (payTag == 2 && _ctrl.ZFB_recharge == false) //微信支付先关闭 { UtilTools.ShowMessage("支付宝支付通道暂时关闭", TextColor.RED); return; } GameObject sceneObj = GameObject.Find("Scene"); if (sceneObj) { StartUpScene startUpMono = sceneObj.GetComponent <StartUpScene>(); if (startUpMono != null) { startUpMono.startIOSWxPay(payTag, _nCost, _nCurKey, _sCurName, _sCurDes); } } } } }