public ActionResult RechrgeEwalletSuccessful() { Api.User.User ApiobjUser = new Api.User.User(); User objUser = (User)Session["User"]; string RechargeAmount = Session["RechrgeAmount"].ToString(); objUser.Ewallet = (float.Parse(objUser.Ewallet) + float.Parse(RechargeAmount)).ToString(); string IsUpdated = ApiobjUser.UpdateEwalletAmount(objUser.Id.ToString(), objUser.Ewallet); Session["User"] = objUser; return(RedirectToAction("Ewallet", "MyStuff")); }
public ActionResult RechrgeEwalletSuccessful() { Api.PaymentTransaction.PaymentTransaction ApiPaymentTransaction = new Api.PaymentTransaction.PaymentTransaction(); Api.User.User ApiobjUser = new Api.User.User(); User objUser = (User)Session["User"]; objUser = (User)(new JavaScriptSerializer().Deserialize(ApiobjUser.getUsersById(objUser.Id.ToString(), Session["access_token"].ToString()), typeof(User))); try { if (Session["RechrgeAmount"] != null) { string RechargeAmount = Session["RechrgeAmount"].ToString(); objUser.Ewallet = (float.Parse(objUser.Ewallet) + float.Parse(RechargeAmount)).ToString(); string IsUpdated = ApiobjUser.UpdateEwalletAmount(objUser.Id.ToString(), objUser.Ewallet, Session["access_token"].ToString()); Session["User"] = objUser; ApiPaymentTransaction.SavePayPalTransaction(objUser.Id.ToString(), RechargeAmount); } } catch (Exception ex) { } Session["RechrgeAmount"] = null; return(RedirectToAction("Ewallet", "MyStuff")); }
public ActionResult RechrgeEwalletSuccessful() { Api.PaymentTransaction.PaymentTransaction ApiPaymentTransaction = new Api.PaymentTransaction.PaymentTransaction(); Api.User.User ApiobjUser = new Api.User.User(); User objUser = (User)Session["User"]; objUser = (User)(new JavaScriptSerializer().Deserialize(ApiobjUser.getUsersById(objUser.Id.ToString(), Session["access_token"].ToString()), typeof(User))); try { if (Session["RechrgeAmount"] != null) { string RechargeAmount = Session["RechrgeAmount"].ToString(); objUser.Ewallet = (float.Parse(objUser.Ewallet) + float.Parse(RechargeAmount)).ToString(); string IsUpdated = ApiobjUser.UpdateEwalletAmount(objUser.Id.ToString(), objUser.Ewallet, Session["access_token"].ToString()); Session["User"] = objUser; ApiPaymentTransaction.SavePayPalTransaction(objUser.Id.ToString(), RechargeAmount); } } catch (Exception ex) { } Session["RechrgeAmount"] = null; return RedirectToAction("Ewallet", "MyStuff"); }
public ActionResult RechrgeEwalletSuccessful() { Api.User.User ApiobjUser = new Api.User.User(); User objUser = (User)Session["User"]; string RechargeAmount = Session["RechrgeAmount"].ToString(); objUser.Ewallet = (float.Parse(objUser.Ewallet) + float.Parse(RechargeAmount)).ToString(); string IsUpdated = ApiobjUser.UpdateEwalletAmount(objUser.Id.ToString(),objUser.Ewallet); Session["User"] = objUser; return RedirectToAction("Ewallet", "MyStuff"); }