Solved

Request.setCharacterEncoding(CharacterEncoding)

Posted on 2010-11-15
1
932 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
ID: 34143178
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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