Example #1
0
 public static Money CalculateNormalMemberEarningsTE(IMembership UserMembership, PtcAdvert Ad)
 {
     //For traffic exchange
     return(calculateExtendedEarnings(UserMembership.AdvertClickEarnings, Ad.ClickValue, Ad.DisplayTimeSeconds));
 }
Example #2
0
        private static Money CalculateExposureDirectEarnings(IMembership userMembership, PtcAdvert ad)
        {
            var exposureEarnings = Money.Zero;

            switch (ad.ExposureType)
            {
            case AdExposure.Mini:
                exposureEarnings = userMembership.ExposureMiniDirectClickEarnings;
                break;

            case AdExposure.Micro:
                exposureEarnings = userMembership.ExposureMicroDirectClickEarnings;
                break;

            case AdExposure.Fixed:
                exposureEarnings = userMembership.ExposureFixedDirectClickEarnings;
                break;

            case AdExposure.Standard:
                exposureEarnings = userMembership.ExposureStandardDirectClickEarnings;
                break;

            case AdExposure.Extended:
                exposureEarnings = userMembership.ExposureExtendedDirectClickEarnings;
                break;

            default:
                break;
            }

            exposureEarnings = Money.MultiplyPercent(exposureEarnings, ad.DirectReferralClickValue);
            return(exposureEarnings);
        }
Example #3
0
 public static Money CalculateEarningsFromDirectReferralTE(IMembership UserMembership, PtcAdvert Ad)
 {
     //For traffic exchange
     return(calculateExtendedEarnings(UserMembership.DirectReferralAdvertClickEarnings, Ad.DirectReferralClickValue, Ad.DisplayTimeSeconds));
 }
Example #4
0
        public static Money CalculateEarningsFromDirectReferral(IMembership UserMembership, PtcAdvert Ad)
        {
            if (AppSettings.PtcAdverts.ExposureCategoriesEnabled)
            {
                return(CalculateExposureDirectEarnings(UserMembership, Ad));
            }

            return(calculateEarnings(UserMembership.DirectReferralAdvertClickEarnings, Ad.DirectReferralClickValue));
        }
Example #5
0
        public static Money CalculateNormalMemberEarnings(IMembership UserMembership, PtcAdvert Ad)
        {
            if (AppSettings.PtcAdverts.ExposureCategoriesEnabled)
            {
                return(CalculateExposureNormalEarnings(UserMembership, Ad));
            }


            return(calculateEarnings(UserMembership.AdvertClickEarnings, Ad.ClickValue));
        }
Example #6
0
 public static Money CalculateNormalMemberEarningsTE(Member User, PtcAdvert Ad)
 {
     return(CalculateNormalMemberEarningsTE(User.Membership, Ad));
 }
Example #7
0
 public static Money CalculateEarningsFromDirectReferralTE(Member User, PtcAdvert Ad)
 {
     return(CalculateEarningsFromDirectReferralTE(User.Membership, Ad));
 }
Example #8
0
 public static Money CalculateEarningsFromRentedReferral(Member User, PtcAdvert Ad)
 {
     return(CalculateEarningsFromRentedReferral(User.Membership, Ad));
 }