Exemplo n.º 1
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (IsXsrf)
                {
                }
                else
                {
                    if (!IsPostBack)
                    {
                        BobibankingRequest bobibankingRequest = new BobibankingRequest();
                        bobibankingRequest.ShoppingMallTranFGTXN_AMT = Convert.ToString(Request["AMT"]).Replace(" ", "+").Decrypt();
                        bobibankingRequest.ShoppingMallTranFGPRN     = Convert.ToString(Request["PRN"]).Replace(" ", "+").Decrypt();
                        bobibankingRequest.ShoppingMallTranFGITC     = Convert.ToString(Request["ITC"]).Replace(" ", "+").Decrypt();
                        //string RU = Convert.ToString(Request.UrlReferrer.OriginalString);
                        //string url = Convert.ToString(Request.UrlReferrer.OriginalString);
                        //if (url.IndexOf("?") > 0)
                        //{
                        //    string[] a = url.Split('?');
                        //    RU = a[0];
                        //}
                        bobibankingRequest.RU = UrlHelper.GetAbsoluteUri() + "Card/PaymentProcess.aspx";
                        //bobibankingRequest.RU = "http://123.108.44.156" + "Card /PaymentProcess.aspx";
                        string rootFilePath   = GetBobibankingKeyPath().Trim();
                        string bobKeyFilePath = rootFilePath + bobibankingFileName.Trim();
                        bobibankingRequest.bobKeyFilePath = bobKeyFilePath;
                        string requestStringBeforeEncryption = bobibankingRequest.GetBobibankingPaymentRequest();
                        //BOBSymmetricCipherHelper bOBSymmetricCipherHelper = new BOBSymmetricCipherHelper();
                        //string requestEncData = bOBSymmetricCipherHelper.encrypt(requestStringBeforeEncryption, "SHA-512");//BobibankingEncryptionDecryption.Encrypt(requestStringBeforeEncryption,bobKeyFilePath);

                        string requestEncData = ConfigurationManager.AppSettings["BOBBankingNetBankingURL"] + requestStringBeforeEncryption;

                        Response.Redirect(requestEncData, false);
                        //encdata.Value = requestStringBeforeEncryption;
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Info("Exception: " + ex.Message);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Handles the Load event of the Page control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 /// <remarks></remarks>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (IsXsrf)
     {
     }
     else
     {
         if (!IsPostBack)
         {
             BobibankingRequest bobibankingRequest = new BobibankingRequest();
             bobibankingRequest.AMT = Convert.ToString(Request["AMT"]);
             bobibankingRequest.PRN = Convert.ToString(Request["PRN"]);
             bobibankingRequest.ITC = Convert.ToString(Request["ITC"]);
             string RU = Convert.ToString(Request.UrlReferrer.OriginalString);
             bobibankingRequest.RU = RU;
             string rootFilePath   = GetBobibankingKeyPath().Trim();
             string bobKeyFilePath = rootFilePath + bobibankingFileName.Trim();
             string requestStringBeforeEncryption = bobibankingRequest.GetBobibankingPaymentRequest();
             string requestEncData = BobibankingEncryptionDecryption.Encrypt(requestStringBeforeEncryption,
                                                                             bobKeyFilePath);
             encdata.Value = requestEncData;
         }
     }
 }