Solved

Request.setCharacterEncoding(CharacterEncoding)

Posted on 2010-11-15
1
966 Views
Last Modified: 2012-05-10
Dear Team,

I have integrated one payment gateway in one of my project when i am doing some transaction its redirecting me to payment gateway page but after transaction when its redirecting me to result page ,page giving me some error please check the below link to check error.

And also i am attaching my code.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="msg.aspx.cs" Inherits="msg" %>


<%
// encoding
String CharacterEncoding = "UTF-8";
Request.setCharacterEncoding(CharacterEncoding);
String BillNo = Request.getParameter("BillNo");
String Currency = Request.getParameter("Currency");
String Amount = Request.getParameter("Amount");
String Succeed = Request.getParameter("Succeed");
String Result = Request.getParameter("Result");
String MD5info = Request.getParameter("MD5info");
String MD5key = "IWMkrbnm";
System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5();
String md5src = BillNo + Currency + Amount + Succeed + MD5key;
String md5str;
md5str = md5.getMD5ofStr(md5src);
%>
<html>
<head><title> Payment Result </title></head>
<body>
<p align="center"> Payment Result </p>
<table align="center" border="1" cellpadding="4">
<tr>
<td> BillNo:</td>
<td><%=BillNo%>
</td>
</tr>
<tr>
<td> Currency </td>
<td><%=Currency%>
</td>
</tr>
<tr>

<td> Amount </td>
<td><%=Amount%>
</td>
</tr>
<tr>
<td> Succeed </td>
<td><%=Succeed%>
</td>
</tr>
<tr>
<td> Result </td>
<td><%=Result%>
</td>
</tr>
<tr>
<td> MD5info </td>
<td><%=MD5info%>
</td>
</tr>
<tr>
<td> Calculate md5</td>
<td><%=md5str%>
</td>
</tr>
<tr>
<td> Validate md5 hash validate </td>
<td><%=(md5str.equalsIgnoreCase(MD5info)) ? "equal" : "not equal"%>
</td>
</tr>
</table>
<p align="center"><a href="#" onclick="javascript:window.close()"><font size="2" color="blove">¿Close¿</font></a></p>
</body>
</html>

Open in new window

0
Comment
Question by:virafh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
soujanya_g earned 500 total points
ID: 34143178
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question