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; }
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; }
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(); }
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"); } } }