示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string temp  = "200904281000001|DOM|IND|INR|1024|1025120|None| http://www.freshprawnsonline.com/thankyou.aspx | http://www.freshprawnsonline.com/failure.aspx |TOML";
        string temp1 = "chinmaya|ganganagar|bangalore|karnataka|560001|IN|91|080|1233456|9741447221|[email protected]|test transaction for direcpay";
        string temp2 = "chinmaya|malleshwaram|bangalore|karnataka|560001|IN|91|080|1233456|9741447221";
        string key   = "qcAHa6tt8s0l5NN7UWPVAQ==";

        //  string key = "mFLZSVqv3ZORJOMiX1FL5Q==";



        //  string temp = "200702091000001|TOML|IND|INR|1024|1025120|None| http://www.freshprawnsonline.com/index.aspx | http://www.freshprawnsonline.com |TOML|1025|chinmayabank|DD";



        temp  = AES128Bit.Encrypt(temp, key, 128);
        temp1 = AES128Bit.Encrypt(temp1, key, 128);
        temp2 = AES128Bit.Encrypt(temp2, key, 128);

        temp  = temp.Replace("\n", "");
        temp1 = temp1.Replace("\n", "");
        temp2 = temp2.Replace("\n", "");

        requestparameter.Text = temp;
        billingDtls.Text      = temp1;
        shippingDtls.Text     = temp2;
    }
示例#2
0
    public void Button1_Click(object sender, System.EventArgs e)
    {
        string requestString = merchantId.Text + "|" + operatingMode.Text + "|" + country.Text + "|" + currency.Text + "|" + amount.Text + "|" + orderNumber.Text + "|" + otherDetails.Text + "|" + successUrl.Text + "|" + failureUrl.Text + "|" + collaboratorId.Text + "|" + gatewayId.Text + "-" + gatewayName.Text + "|" + gatewayType.Text;
        string encryptedText = AES128Bit.Encrypt(requestString, completeEncodedKey, keySize);

        requestparams.Value = encryptedText;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int    keysize    = 128;
        string strHashKey = "fBc5628ybRQf88f/aqDUOQ==";

        if (Request.Form.Count > 0 && !string.IsNullOrEmpty(Request.Form[0]))
        {
            var      response    = AES128Bit.Decrypt(Request.Form[0], strHashKey, keysize);
            string[] arrResponse = response.ToString().Split('|');
            lblOrderID.Text             = arrResponse[0];
            lblAtrn.Text                = arrResponse[1];
            lblStatus.Text              = arrResponse[2];
            lblAmount.Text              = arrResponse[3];
            lblCurrency.Text            = arrResponse[4];
            lblPaymode.Text             = arrResponse[5];
            lblOtherDetails.Text        = arrResponse[6];
            lblBankCode.Text            = arrResponse[8];
            lblBankReferenceNumber.Text = arrResponse[9];
            lblTransDate.Text           = arrResponse[10];
            lblCountry.Text             = arrResponse[11];
            lblCIN.Text = arrResponse[12];

            functions     a   = new functions();
            string        sql = "UPDATE dbo.association SET atrn = '" + lblAtrn.Text + "' WHERE order_id = '" + lblOrderID.Text + "'";
            SqlCommand    c   = new SqlCommand(sql);
            SqlConnection con = new SqlConnection(a.connect());;
            try
            {
                a.execute_sql(sql);
                //con.Open();
                //int i = c.ExecuteNonQuery();
                //if (i == 0)
                //{
                sql = "UPDATE dbo.individual SET atrn = '" + lblAtrn.Text + "' WHERE order_id = '" + lblOrderID.Text + "'";
                //    c = new SqlCommand(sql);
                //    i = c.ExecuteNonQuery();
                //}
                a.execute_sql(sql);
            }
            catch (Exception ex)
            {
                lblError.Text = ex.Message;
            }
            finally
            {
                c.Dispose();
                con.Close();
            }
        }
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    keysize    = 128;
        string strHashKey = "fBc5628ybRQf88f/aqDUOQ==";

        if (Request.Form.Count > 0 && !string.IsNullOrEmpty(Request.Form[0]))
        {
            var      response    = AES128Bit.Decrypt(Request.Form[0], strHashKey, keysize);
            string[] arrResponse = response.ToString().Split('|');
            lblRefundRequestID.Text   = arrResponse[0];
            lblStatus.Text            = arrResponse[1];
            lblMessage.Text           = arrResponse[2];
            lblRefundReferenceNo.Text = arrResponse[3];
        }
    }
示例#5
0
    public static void Main(string[] args)
    {
        string plainStr = "mypassword";

        Console.WriteLine("Original Text: {0}", plainStr);

        int    keySize            = 128;
        string completeEncodedKey = "glBv+xevOenDM5ydcqb9pA==";

        string encryptedText = AES128Bit.Encrypt(plainStr, completeEncodedKey, keySize);

        Console.WriteLine("Encrypted Text: {0}", encryptedText);

        string decrypted = AES128Bit.Decrypt(encryptedText, completeEncodedKey, keySize);

        Console.WriteLine("Decrypted Text: {0}", decrypted);

        Console.Read();
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            filloffers();
            filllatest();
            filldiscount();

            Order          or     = new Order();
            MembershipUser memb   = Membership.GetUser(Profile.UserName);
            string         userid = "";
            try
            {
                userid = memb.ProviderUserKey.ToString();
                DataTable dt      = or.select_order_userid(userid);
                string    orderid = dt.Rows[0][0].ToString();



                double amount = Profile.prawncrunchShopping.Total;


                DataSet ds = or.select_order(userid);

                string name    = ds.Tables[0].Rows[0]["firstname"].ToString();
                string address = ds.Tables[0].Rows[0]["address"].ToString();
                string city    = ds.Tables[0].Rows[0]["city"].ToString();
                string state   = ds.Tables[0].Rows[0]["state"].ToString();

                string email  = ds.Tables[0].Rows[0]["email"].ToString();
                string mobile = ds.Tables[0].Rows[0]["mobile"].ToString();

                string ship_name    = ds.Tables[0].Rows[0]["delivery_firstname"].ToString();
                string ship_address = ds.Tables[0].Rows[0]["delivery_address"].ToString();
                string ship_city    = ds.Tables[0].Rows[0]["delivery_city"].ToString();
                string ship_state   = ds.Tables[0].Rows[0]["delivery_state"].ToString();

                string ship_email  = ds.Tables[0].Rows[0]["delivery_email"].ToString();
                string ship_mobile = ds.Tables[0].Rows[0]["delivery_mobile"].ToString();



                string temp = "201207201000001|DOM|IND|INR|" + amount + "|" + orderid + "|None| http://www.freshprawnsonline.com/thankyou.aspx | http://www.freshprawnsonline.com/failure.aspx |DirecPay";
                //billing
                // string temp1 = "chinmaya|ganganagar|bangalore|karnataka|560001|IN|91|080|1233456|9741447221|[email protected]|test transaction for direcpay";

                string temp1 = name + "|" + address + "|" + city + "|" + state + "|" + "560032" + "|IN|91|080|758956|" + mobile + "|" + email + "|test transaction for direcpay";
                //shipping

                // string temp2 = "chinmaya|malleshwaram|bangalore|karnataka|560001|IN|91|080|1233456|9741447221";

                string temp2 = ship_name + "|" + ship_address + "|" + ship_city + "|" + ship_state + "|" + "560032|IN|91|080|758956|" + ship_mobile;
                string key   = "DjOL6xasKPqk1ZOeSeMFFQ==";


                temp  = AES128Bit.Encrypt(temp, key, 128);
                temp1 = AES128Bit.Encrypt(temp1, key, 128);
                temp2 = AES128Bit.Encrypt(temp2, key, 128);

                temp  = temp.Replace("\n", "");
                temp1 = temp1.Replace("\n", "");
                temp2 = temp2.Replace("\n", "");

                requestparameter.Text = temp;
                billingDtls.Text      = temp1;
                shippingDtls.Text     = temp2;
            }
            catch (Exception ex)
            {
                Response.Redirect("Login.aspx");
            }
        }
    }