コード例 #1
0
        protected void btnPayNow_Click(object sender, EventArgs e)
        {
            SecurePage _objSecurePage = new SecurePage();

            _ObjCommon = new Common();

            var           objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            MailTemplates objMailTemplates = new MailTemplates();
            string        formNumber       = "ADMJ" + System.DateTime.Now.Year + _ObjCommon.CourseId.ToString() + _objSecurePage.LoggedInUserId.ToString();

            ConsullingCourseAmount = lblCash.Text;
            string TransectionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + lblCash.Text + "/- ";
            var    UserDetails        = UserManager.Instance.GetUserListById(_objSecurePage.LoggedInUserId);


            var sp = UserDetails.First();
            UserRegistrationProperty _ObjUserRegistrationProperty = new
                                                                    UserRegistrationProperty
            {
                UserFullName              = _objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = _objSecurePage.LoggedInUserEmailId,
                MobileNo                  = _objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = _objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = _objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            string ErrMsg = "";
            int    i      = UserManagerProvider.Instance.UpdateUserInfo(_ObjUserRegistrationProperty, 1, out ErrMsg);
            var    mail   = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Direct Admission:Form Number" + formNumber
            };
            var body = objMailTemplates.SendValidationMailForTheDirectAdmission("http://www.admissionjankari.com/", _objSecurePage.LoggedInUserName, formNumber, TransectionDetails);

            mail.Body = body;
            mail.To.Add(_objSecurePage.LoggedInUserEmailId);
            mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
            Utils.SendMailMessageAsync(mail);
            libfuncs myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = lblCash.Text;
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Utils.AbsoluteWebRoot + "ConformationPage.aspx?CID=" + objCrypto.Encrypt(_objSecurePage.LoggedInUserEmailId) + "&frmNumber=" + objCrypto.Encrypt(formNumber) + "&UID=" + objCrypto.Encrypt(_objSecurePage.LoggedInUserId.ToString());
            string WorkingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, WorkingKey);
            billing_cust_name.Value     = _objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = _objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = _objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            i = _objConsulling.InsertUpdateUserTransctionalDetails(_objSecurePage.LoggedInUserId, formNumber);
            // Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", "PostDFormS();");
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), Guid.NewGuid().ToString(),
                                                    "PostDForm();", true);
        }
コード例 #2
0
        private void OnlinePayment()
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();
            var formNumber       = "ADMJ" + System.DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString();
            var userDetails      = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);

            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg    = "";
            int i         = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var myUtility = new libfuncs();

            Merchant_Id.Value = "M_shi18022_18022";
            var bookSeatPayment = "";

            if (Request.QueryString["BookSeatPayment"] != null)
            {
                bookSeatPayment = objCrypto.Decrypt(Request.QueryString["BookSeatPayment"].ToString());
            }
            Amount.Value       = !string.IsNullOrEmpty(bookSeatPayment)?bookSeatPayment:"26100";
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = "http://admissionjankari.com/ConformationPage.aspx?CID=" + objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&frmNumber=" + objCrypto.Encrypt(formNumber) + "&UID=" + objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString());
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();

            ScriptManager.RegisterStartupScript(this, GetType(), "YourUniqueScriptKey",
                                                "PostDForm();", true);
        }
コード例 #3
0
        private void OnlinePayment()
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();
            var formNumber       = "ADMJ" + System.DateTime.Now.Year + _objCommon.CourseId.ToString() + objSecurePage.LoggedInUserId.ToString();

            string transectionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + lblCash1.Text + "/- ";
            var    userDetails        = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);


            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg = "";
            var i      = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var mail   = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Direct Admission:Form Number" + formNumber
            };
            var amount    = lblCash1.Text;
            var myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = amount;
            Order_Id.Value     = formNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Utils.AbsoluteWebRoot + "ConformationPage.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&frmNumber=" +
                                 objCrypto.Encrypt(formNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString() + "&Amount=" + amount);
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            i = _objConsulling.InsertUpdateUserTransctionalDetails(objSecurePage.LoggedInUserId, formNumber);
            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "YourUniqueScriptKey",
                                                    "PostDForm();", true);
        }
コード例 #4
0
        private void OnlinePayment(string orderNumber)
        {
            var objSecurePage = new SecurePage();

            _objCommon = new Common();

            var objCrypto        = new ClsCrypto(ClsSecurity.GetPasswordPhrase(Common.PassPhraseOne, Common.PassPhraseTwo));
            var objMailTemplates = new MailTemplates();


            string transactionDetails = "You have selected the payment mode through Online Payment of" + " " + "Rs." + " " + hdnAmount.Value + "/- ";
            var    userDetails        = UserManagerProvider.Instance.GetUserListById(objSecurePage.LoggedInUserId);

            var objCarProduct = new Common().GetProductForCart(0, Request["id"] == null ? orderNumber : null,
                                                               Request["id"] != null
                                                                      ? Convert.ToInt32(Request["id"])
                                                                      : 0);
            var mail = new MailMessage
            {
                From    = new MailAddress(ApplicationSettings.Instance.Email),
                Subject = "Product Order Number:" + orderNumber
            };
            var body = objMailTemplates.SendProductConfirmationMail(objSecurePage.LoggedInUserName,
                                                                    orderNumber, transactionDetails, objCarProduct.Tables[0]);

            mail.Body = body;
            mail.To.Add(objSecurePage.LoggedInUserEmailId);
            mail.Bcc.Add(ClsSingelton.bccDirectAdmission);
            Utils.SendMailMessageAsync(mail);
            var sp = userDetails.First();
            var objUserRegistrationProperty = new
                                              UserRegistrationProperty
            {
                UserFullName              = objSecurePage.LoggedInUserName,
                UserGender                = sp.UserGender,
                UserEmailid               = objSecurePage.LoggedInUserEmailId,
                MobileNo                  = objSecurePage.LoggedInUserMobile,
                PhoneNo                   = sp.PhoneNo,
                UserId                    = objSecurePage.LoggedInUserId,
                CourseId                  = sp.CourseId,
                UserCategoryId            = objSecurePage.LoggedInUserType,
                UserDOB                   = sp.UserDOB,
                UserStatus                = true,
                UserPassword              = sp.UserPassword,
                UserPincode               = txtPincode.Text.Trim(),
                UserCorrespondenceAddress = txtAddress.Text.Trim()
            };
            var errMsg    = "";
            var i         = UserManagerProvider.Instance.UpdateUserInfo(objUserRegistrationProperty, 1, out errMsg);
            var amount    = hdnAmount.Value;
            var myUtility = new libfuncs();

            Merchant_Id.Value  = "M_shi18022_18022";
            Amount.Value       = amount;
            Order_Id.Value     = orderNumber + DateTime.Now.ToString("hh:mm:ss");
            Redirect_Url.Value = Request["id"] != null
                                     ? Utils.AbsoluteWebRoot + "account/paymentconfirmation.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&orderNumber=" +
                                 objCrypto.Encrypt(orderNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString() + "&Amount=" + amount +
                                                   "&id=" + Request["id"])
                                     : Utils.AbsoluteWebRoot + "account/paymentconfirmation.aspx?CID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserEmailId) + "&orderNumber=" +
                                 objCrypto.Encrypt(orderNumber) + "&UID=" +
                                 objCrypto.Encrypt(objSecurePage.LoggedInUserId.ToString());
            var workingKey = ClsSingelton.WorkingKey.Trim();

            Checksum.Value              = myUtility.getchecksum(Merchant_Id.Value, Order_Id.Value, Amount.Value, Redirect_Url.Value, workingKey);
            billing_cust_name.Value     = objSecurePage.LoggedInUserName;
            billing_cust_address.Value  = txtAddress.Text.Trim();
            billing_cust_state.Value    = txtState.Text;
            billing_cust_country.Value  = "India";
            billing_cust_tel.Value      = objSecurePage.LoggedInUserMobile;
            billing_cust_email.Value    = objSecurePage.LoggedInUserEmailId;
            delivery_cust_name.Value    = "";
            delivery_cust_address.Value = "";
            delivery_cust_state.Value   = "";
            delivery_cust_country.Value = "";
            delivery_cust_tel.Value     = "";
            billing_cust_city.Value     = txtCity.Text;
            billing_zip_code.Value      = txtPincode.Text.Trim();
            delivery_cust_city.Value    = "";
            delivery_zip_code.Value     = "";
            _objConsulling              = new Consulling();
            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(Page), "YourUniqueScriptKey",
                                                    "PostDForm();", true);
        }