Solved

Request.setCharacterEncoding(CharacterEncoding)

Posted on 2010-11-15
1
906 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
1 Comment
 
LVL 5

Accepted Solution

by:
soujanya_g earned 500 total points
Comment Utility
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now