public ActionResult UpgradePlan(string AccountType)
 {
     string amount="";
     string returnurl = "";
     User objUser = (User)Session["User"];
     Helper.Payment objpayment=new Helper.Payment ();
     Session["AccountType"] = AccountType;
     if (AccountType == "Personal")
     {
         amount = "5";
     }
     else if (AccountType == "Personal")
     {
         amount = "10";
     }
     else if (AccountType == "Personal")
     {
         amount = "25";
     }
     string UserName = objUser.UserName;
     string EmailId = objUser.EmailId;
     string UpgradePlanSuccessURL = ConfigurationManager.AppSettings["UpgradeAccountSuccessURL"];
     string UpgradePlanFailedURL = ConfigurationManager.AppSettings["UpgradeAccountFailedURL"];
     string UpgradePlanpaypalemail = ConfigurationManager.AppSettings["UpgradeAccountpaypalemail"];
     string userId = objUser.Id.ToString();
     returnurl = objpayment.PayWithPayPal(amount, AccountType, UserName, "", EmailId, "USD", UpgradePlanpaypalemail, UpgradePlanSuccessURL,
                                     UpgradePlanFailedURL, UpgradePlanSuccessURL, "", "", userId);
    return Content(returnurl);
 }
Exemplo n.º 2
0
        public ActionResult UpgradePlan(string AccountType)
        {
            string amount    = "";
            string returnurl = "";
            User   objUser   = (User)Session["User"];

            Helper.Payment objpayment = new Helper.Payment();
            Session["AccountType"] = AccountType;
            if (AccountType == "Personal")
            {
                amount = "5";
            }
            else if (AccountType == "Personal")
            {
                amount = "10";
            }
            else if (AccountType == "Personal")
            {
                amount = "25";
            }
            string UserName = objUser.UserName;
            string EmailId  = objUser.EmailId;
            string UpgradePlanSuccessURL  = ConfigurationManager.AppSettings["UpgradeAccountSuccessURL"];
            string UpgradePlanFailedURL   = ConfigurationManager.AppSettings["UpgradeAccountFailedURL"];
            string UpgradePlanpaypalemail = ConfigurationManager.AppSettings["UpgradeAccountpaypalemail"];
            string userId = objUser.Id.ToString();

            returnurl = objpayment.PayWithPayPal(amount, AccountType, UserName, "", EmailId, "USD", UpgradePlanpaypalemail, UpgradePlanSuccessURL,
                                                 UpgradePlanFailedURL, UpgradePlanSuccessURL, "", "", userId);
            return(Content(returnurl));
        }