コード例 #1
0
        protected void OnPayClick(YxGoods goodsInfo, YxPayInfo payInfo)
        {
            if (goodsInfo == null)
            {
                return;
            }
            if (payInfo == null)
            {
                return;
            }
            var payCtrl = PayController.Instance;

            _payState = 1;
            payCtrl.GetPayment(payInfo.Id, goodsInfo.BuyNum, goodsInfo.Description, goodsInfo.Id, payInfo.PayType,
                               OnPaySuccess,
                               OnPayCancel,
                               OnPayFaile,
                               OnCheckUrlPayStatus);
        }
コード例 #2
0
        private void UpdatePayTypes()
        {
            YxWindowUtils.CreateMonoParent(PrefabPayItemGrid, ref _payItemGrid);
            if (PayTypeList == null)
            {
                Close();
                return;
            }
            var len = PayTypeList.Count;

            if (len == 1 && NeedDirectPay)
            {
                var payInfo = new YxPayInfo();
                if (payInfo.Parse(PayTypeList[0]))
                {
                    OnPayClick(GetData <YxGoods>(), payInfo);
                }
            }
            var gridTs = _payItemGrid.transform;

            for (var i = 0; i < len; i++)
            {
                var dict = PayTypeList[i] as Dictionary <string, object>;
                if (dict == null)
                {
                    continue;
                }
                var payInfo = new YxPayInfo();
                if (!payInfo.Parse(PayTypeList[i]))
                {
                    continue;
                }
                var item = YxWindowUtils.CreateItem(PrefabPayItem, gridTs);
                item.UpdateView(payInfo);
            }
            _payItemGrid.Reposition();
        }
コード例 #3
0
 public void OnChangePayType(YxPayChangeItem item)
 {
     _curType = item.GetData <YxPayInfo>();
 }