/// <summary>
        /// Processes the response from bobibanking.
        /// </summary>
        /// <param name="msgResponse">The MSG response.</param>
        /// <remarks></remarks>
        private void ProcessResponseFromBobibanking(string msgResponse)
        {
            string rootFilePath   = GetBobibankingKeyPath();
            string bobKeyFilePath = rootFilePath + "BOB.KEY";
            string msg            = BobibankingEncryptionDecryption.Decrypt(msgResponse, bobKeyFilePath);

            BobibankingString.Text = msg;
            BobibankingResponse bobibankingResponse = new BobibankingResponse(msg);

            try
            {
                // string accountNumber = CardHolderManager.GetLoggedInUser().creditcard_acc_number.Decrypt();
                string paymentStatus = bobibankingResponse.IsTransactionValid();
                BobibankingPaymentStatus.Text = paymentStatus;
            }
            catch (Exception exp)
            {
                Exception.Text = Constants.GeneralErrorMessage;
            }
        }
Exemple #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;
         }
     }
 }