//调起支付 private bool UpPayClick(int id, object obj) { NativeHandle handle = new NativeHandle(); if (type == payType.alipay) { object payData = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.alipay, PayOrderInterfaceMgr.Instance.payfor, GetPayCount()); if (payData != null) { handle.Alipay(payData.ToString()); type = payType.none; } } else if (type == payType.wechat) { object o = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.wx, PayOrderInterfaceMgr.Instance.payfor, GetPayCount()); if (o != null) { PayData payData = o as PayData; handle.WechatPay(payData.appid, payData.partnerid, payData.prepayid, payData.noncestr, payData.timestamp, payData.package, payData.sign); type = payType.none; } } else { SystemMsgView.SystemFunction(Function.Tip, Info.Chooseone); } return(false); }
private void OnEnsurePayClik() { //直接登录模式直接调起 if (PayOrderInterfaceMgr.Instance.payfor == PayFor.Login && !PlayerSave.HasKey("Login")) { NativeHandle handle = new NativeHandle(); if (type == payType.alipay) { object payData = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.alipay, PayOrderInterfaceMgr.Instance.payfor, GetPayCount()); if (payData != null) { handle.Alipay(payData.ToString()); Debug.Log(string.Format("<color=#ffffffff><---{0}-{1}----></color>", payData.ToString(), "test1")); } } else if (type == payType.wechat) { object o = PayOrderInterfaceMgr.Instance.GetDatas(LoginModel.Instance.Uid, Urltype.wx, PayOrderInterfaceMgr.Instance.payfor, GetPayCount()); if (o != null) { PayData payData = o as PayData; handle.WechatPay(payData.appid, payData.partnerid, payData.prepayid, payData.noncestr, payData.timestamp, payData.package, payData.sign); } } else { SystemMsgView.SystemFunction(Function.Tip, Info.Chooseone); } } else if (PayOrderInterfaceMgr.Instance.payfor == PayFor.Exchange) { CommitViewModel cvm = CommitViewModel.Instance; CommitController.Instance.OidExchangeReq(LoginModel.Instance.Uid, 1, cvm.Name, cvm.Phone, cvm.Province, cvm.City, cvm.Country, cvm.SelectPinpai, cvm.Address, cvm.Beaty, (int)type); } EnsurePay.onClick.RemoveListener(OnEnsurePayClik); }