<%
If Not Me.FindControl("head1") Is Nothing Then
Dim head As Control = Me.FindControl("head1")
Dim l As New Literal
l.Text = ""
head.Controls.Add(l)
End If
%>
<%
Dim oid As String = Request.QueryString("oid")
Dim ctrl As String = Request.QueryString("ctrl")
Dim storekey As String = ConfigurationManager.AppSettings("PayUSecret")
Dim okUrl As String = BaseUrl & "/store/banks3d/3dodemepayu.aspx?oid=" & oid
'ssl
If ConfigurationManager.AppSettings("UseSsl") = "True" Then
okUrl = BaseUrl.Replace("http://", "https://") & "/store/banks3d/3dodemepayu.aspx?oid=" & oid
End If
Dim hashstr As New StringBuilder()
hashstr.Append(Encoding.UTF8.GetBytes(okUrl).Length & okUrl)
'Hash
Dim sb As New StringBuilder()
Dim data As Byte() = Encoding.UTF8.GetBytes(hashstr.ToString)
Dim secretkey As Byte() = Encoding.UTF8.GetBytes(storekey)
Dim hmacMD5 As New System.Security.Cryptography.HMACMD5(secretkey)
Dim macSender As Byte() = hmacMD5.ComputeHash(data)
For i As Integer = 0 To macSender.Length - 1
sb.Append(macSender(i).ToString("x2"))
Next
hmacMD5.Clear()
Dim hash As String = sb.ToString()
Response.Write(hashstr.ToString & "-" & hash)
%>