Example #1
0
        public void Payment(object sender, EventArgs e)
        {
            User user = (User)Session["LoggedUser"];
            SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();
            string amount = string.Empty;
            string plantype = string.Empty;

            PackageRepository packRepo = new PackageRepository();
            if (user.AccountType.ToLower() == AccountType.Standard.ToString().ToLower())
            {
               Package pack = packRepo.getPackageDetails(AccountType.Standard.ToString());
                plantype = "StandardPlan of blackSheep";
                amount = pack.Pricing.ToString();
            }
            else if (user.AccountType.ToLower() == AccountType.Deluxe.ToString().ToLower())
            {
                Package pack = packRepo.getPackageDetails(AccountType.Deluxe.ToString());
                plantype = "DeluxePlan of blackSheep";
                amount = pack.Pricing.ToString();
            }
            else if (user.AccountType.ToLower() == AccountType.Premium.ToString().ToLower())
            {
                Package pack = packRepo.getPackageDetails(AccountType.Premium.ToString());
                plantype = "PremiumPlan of blackSheep";
                amount = pack.Pricing.ToString();
            }

            string pay = payme.PayWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
                                  ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());
            Response.Redirect(pay);
        }
Example #2
0
        public void Payment()
        {
            User user = (User)Session["LoggedUser"];
            SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();
            string amount = string.Empty;
            string plantype = string.Empty;
            if (type == "Standard")
            {
                plantype = lstPackage[0].PackageName;
                amount = Convert.ToString(lstPackage[0].Pricing);
            }
            else if (type == "Deluxe")
            {
                plantype = lstPackage[1].PackageName;
                amount = Convert.ToString(lstPackage[1].Pricing);
            }
            else if (type == "Premium")
            {
                plantype = lstPackage[2].PackageName;
                amount = Convert.ToString(lstPackage[2].Pricing);
            }

            PackageRepository objPackageRepository = new PackageRepository();

            Package objPackage = objPackageRepository.getPackageDetails(plantype);

            if (objPackage != null)
            {
                HttpContext.Current.Session["PackageDetails"] = objPackage;
            }

            string pay = string.Empty;

            //#region DirectPaymentWithPayPal
            //pay = payme.PayWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
            //              ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());

            //#endregion

            #region RecurringPaymentWithPayPal

            pay = payme.RecurringPaymentWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
                                 ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());
            #endregion
            Response.Redirect(pay);
        }
Example #3
0
        protected void PayPalEnterprice_click()
        {
            SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();

            string amount = "9999";
            string plantype = "Enterprise";
            string UserName = "******";
            String EmailId = "*****@*****.**";

            String EnterPriseSuccessURL = ConfigurationManager.AppSettings["EnterPriseSuccessURL"];
            String EnterPriseFailedURL = ConfigurationManager.AppSettings["EnterPriseFailedURL"];
            String EnterPrisepaypalemail = ConfigurationManager.AppSettings["EnterPrisepaypalemail"];
            String userId = "";

            string pay = payme.PayWithPayPal(amount, plantype, UserName, "", EmailId, "USD", ConfigurationManager.AppSettings["EnterPrisepaypalemail"], ConfigurationManager.AppSettings["EnterPriseSuccessURL"],
                                    ConfigurationManager.AppSettings["EnterPriseFailedURL"], ConfigurationManager.AppSettings["EnterPriseSuccessURL"], ConfigurationManager.AppSettings["EnterPrisecancelurl"], ConfigurationManager.AppSettings["EnterPrisenotifyurl"], userId);

            Response.Redirect(pay);
        }
Example #4
0
        protected void PayPalEnterprice_click()
        {
            SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();

            string amount   = "9999";
            string plantype = "Enterprise";
            string UserName = "******";
            String EmailId  = "*****@*****.**";

            String EnterPriseSuccessURL  = ConfigurationManager.AppSettings["EnterPriseSuccessURL"];
            String EnterPriseFailedURL   = ConfigurationManager.AppSettings["EnterPriseFailedURL"];
            String EnterPrisepaypalemail = ConfigurationManager.AppSettings["EnterPrisepaypalemail"];
            String userId = "";

            string pay = payme.PayWithPayPal(amount, plantype, UserName, "", EmailId, "USD", ConfigurationManager.AppSettings["EnterPrisepaypalemail"], ConfigurationManager.AppSettings["EnterPriseSuccessURL"],
                                             ConfigurationManager.AppSettings["EnterPriseFailedURL"], ConfigurationManager.AppSettings["EnterPriseSuccessURL"], ConfigurationManager.AppSettings["EnterPrisecancelurl"], ConfigurationManager.AppSettings["EnterPrisenotifyurl"], userId);

            Response.Redirect(pay);
        }
Example #5
0
        public void Payment()
        {
            User user = (User)Session["LoggedUser"];

            SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();
            string amount   = string.Empty;
            string plantype = string.Empty;

            if (type == "Standard")
            {
                plantype = lstPackage[1].PackageName;
                amount   = Convert.ToString(lstPackage[1].Pricing);
            }
            else if (type == "Premium")
            {
                plantype = lstPackage[2].PackageName;
                amount   = Convert.ToString(lstPackage[2].Pricing);
            }

            else if (type == "Deluxe")
            {
                plantype = lstPackage[3].PackageName;
                amount   = Convert.ToString(lstPackage[3].Pricing);
            }

            else if (type == "SocioBasic")
            {
                plantype = lstPackage[4].PackageName;
                amount   = Convert.ToString(lstPackage[4].Pricing);
            }

            else if (type == "SocioStandard")
            {
                plantype = lstPackage[5].PackageName;
                amount   = Convert.ToString(lstPackage[5].Pricing);
            }


            else if (type == "SocioPremium")
            {
                plantype = lstPackage[6].PackageName;
                amount   = Convert.ToString(lstPackage[6].Pricing);
            }
            else if (type == "SocioDeluxe")
            {
                plantype = lstPackage[7].PackageName;
                amount   = Convert.ToString(lstPackage[7].Pricing);
            }


            PackageRepository objPackageRepository = new PackageRepository();

            Package objPackage = objPackageRepository.getPackageDetails(plantype);

            if (objPackage != null)
            {
                HttpContext.Current.Session["PackageDetails"] = objPackage;
            }

            string pay = string.Empty;

            //#region DirectPaymentWithPayPal
            //pay = payme.PayWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
            //              ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());

            //#endregion

            #region RecurringPaymentWithPayPal

            pay = payme.RecurringPaymentWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
                                                   ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());
            #endregion
            Response.Redirect(pay);
        }
Example #6
0
        public void Payment(object sender, EventArgs e)
        {
            try
            {
                PackageRepository packageRepo = new PackageRepository();

                List<Package> lstPackage = packageRepo.getAllPackage();
                User user = (User)Session["LoggedUser"];
                SocioBoard.Helper.Payment payme = new SocioBoard.Helper.Payment();
                string amount = string.Empty;
                string plantype = string.Empty;
                if (lstPackage.Count > 0)
                {
                    if (user.AccountType.ToLower() == "standard")
                    {
                        plantype = lstPackage[0].PackageName;
                        amount = Convert.ToString(lstPackage[0].Pricing);
                    }
                    else if (user.AccountType.ToLower() == "deluxe")
                    {
                        plantype = lstPackage[1].PackageName;
                        amount = Convert.ToString(lstPackage[1].Pricing);
                    }
                    else if (user.AccountType.ToLower() == "premium")
                    {
                        plantype = lstPackage[2].PackageName;
                        amount = Convert.ToString(lstPackage[2].Pricing);
                    }
                }
                else
                {
                    if (user.AccountType.ToLower() == "standard")
                    {
                        plantype = "StandardPlan of Socioboard";
                        amount = "39";
                    }
                    else if (user.AccountType.ToLower() == "deluxe")
                    {
                        plantype = "DeluxePlan of Socioboard";
                        amount = "59";
                    }
                    else if (user.AccountType.ToLower() == "premium")
                    {
                        plantype = "PremiumPlan of Socioboard";
                        amount = "99";
                    }
                }

                string pay = string.Empty;

                #region DirectPaymentWithPayPal
                pay = payme.PayWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
                              ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());

                #endregion

                //#region RecurringPaymentWithPayPal

                //pay = payme.RecurringPaymentWithPayPal(amount, plantype, user.UserName, "", user.EmailId, "USD", ConfigurationManager.AppSettings["paypalemail"], ConfigurationManager.AppSettings["SuccessURL"],
                //                     ConfigurationManager.AppSettings["FailedURL"], ConfigurationManager.AppSettings["SuccessURL"], ConfigurationManager.AppSettings["cancelurl"], ConfigurationManager.AppSettings["notifyurl"], user.Id.ToString());
                //#endregion

                Response.Redirect(pay);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.StackTrace);
            }
        }