예제 #1
0
        private void AnalyticStartPay()
        {
            var eventId = string.Format("charge_pay_{0}", Reason);
            var attrs   = new Dictionary <string, string>();

            attrs.Add("prepayment", _data != null ? _data.name : "NULL");
            attrs.Add("channel", PayChannelType.GetPayChannelNameId(_selectedPayChannel));
            var analyticManager = GetAnalyticManager();

            analyticManager.EventValue(eventId, attrs, (int)Time.realtimeSinceStartup);
        }
예제 #2
0
        private void AnalyticPayFail(string error, string errorCode = null)
        {
            var eventId = string.Format("charge_pay_{0}_fail", Reason);
            var attrs   = new Dictionary <string, string>();

            attrs.Add("prepayment", _data != null ? _data.name : "NULL");
            attrs.Add("channel", PayChannelType.GetPayChannelNameId(_selectedPayChannel));
            attrs.Add("error", error);
            if (!string.IsNullOrEmpty(errorCode))
            {
                attrs.Add("error_code", errorCode);
            }

            var analyticManager = GetAnalyticManager();

            analyticManager.EventValue(eventId, attrs, (int)(Time.realtimeSinceStartup - _payStartTime));
        }
예제 #3
0
        private void AnalyticPayOk()
        {
            var analyticManager = GetAnalyticManager();

            if (_data != null)
            {
                analyticManager.Pay((float)_data.price, DataUtil.CalculateGeValue(_data), _selectedPayChannel);
            }

            var eventId = string.Format("charge_pay_{0}_ok", Reason);
            var attrs   = new Dictionary <string, string>();

            attrs.Add("prepayment", _data != null ? _data.name : "NULL");
            attrs.Add("channel", PayChannelType.GetPayChannelNameId(_selectedPayChannel));
            attrs.Add("total_fee", _data != null ? "" + _data.price : "0");
            analyticManager.EventValue(eventId, attrs, (int)(Time.realtimeSinceStartup - _payStartTime));
        }