Пример #1
0
        protected NameValueCollection GetPostData()
        {
            var data = new NameValueCollection();

            data[Parameters.GlobalPostbackType] = GlobalPostbackType.ToString();
            data[Parameters.OfferId]            = OfferId.ToString();
            data[Parameters.OfferName]          = OfferName;
            data[Parameters.IpAddress]          = Ip;
            data[Parameters.CountryCode]        = CountryCode;
            data[Parameters.SubId]        = SubId;
            data[Parameters.Payout]       = Payout.ToClearString();
            data[Parameters.CurrencyCode] = CurrencyCode;

            if (Age != -1)
            {
                data[Parameters.Age] = Age.ToString();
            }

            data[Parameters.Gender] = Gender.ToString();
            if (!string.IsNullOrEmpty(SubId2))
            {
                data[Parameters.SubId2] = SubId2;
            }
            if (!string.IsNullOrEmpty(SubId3))
            {
                data[Parameters.SubId3] = SubId3;
            }

            return(data);
        }
Пример #2
0
        private static NameValueCollection GetTestPostData(string subId, Money payout, GlobalPostbackType globalPostbackType = GlobalPostbackType.Cpa)
        {
            var data = new NameValueCollection();

            data[Parameters.OfferId]            = "TestOfferId";
            data[Parameters.OfferName]          = "TestOfferName";
            data[Parameters.IpAddress]          = "TestIpAddress";
            data[Parameters.CountryCode]        = "TestCountryCode";
            data[Parameters.Age]                = "TestAge";
            data[Parameters.Gender]             = Prem.PTC.Members.Gender.Null.ToString();
            data[Parameters.SubId]              = subId;
            data[Parameters.Payout]             = payout.ToClearString();
            data[Parameters.CurrencyCode]       = AppSettings.Site.CurrencyCode;
            data[Parameters.GlobalPostbackType] = globalPostbackType.ToString();
            return(data);
        }