Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Request.setCharacterEncoding(CharacterEncoding)

Posted on 2010-11-15
1
Medium Priority
?
1,006 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 2000 total points
ID: 34143178
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

971 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