Associate
- Joined
- 2 Sep 2007
- Posts
- 2,001
Hi All
I am developing a website which allows our students to enrol online. The payments are made through Barclays Epdq system. The student gets to a certain step of the enrolment form and when they click on the pay button I send the info which Barclays need (returnurl, merchantname, an encrypted value) they fill in their card info and they are sent back to my returning page. (this works).
Now Barclays gave me the code to put in the returning page. This code works but the problem is I don't want to write the information to a file but to a database I know how to write to a database. Here is the problem, for testing purposes I thought right lets output some of the stuff written to the file. See in bold. It will not output what's in the form variable under any circumstances. This has never been a problem for me in the past. Then I thought right put a textbox or label on the page and output to that for e.g.
Label1.Text = Request.Form("oid")
or
TextBox1.Text = Request.Form("oid")
Neither of the above work. Then I thought right put the values into session variables then to a redirect to another page on my site and pull the info I need from the sess variables but Server.Transfer refuses to work. I mean WTF. This is driving me nuts. Any ideas?
I am developing a website which allows our students to enrol online. The payments are made through Barclays Epdq system. The student gets to a certain step of the enrolment form and when they click on the pay button I send the info which Barclays need (returnurl, merchantname, an encrypted value) they fill in their card info and they are sent back to my returning page. (this works).
Now Barclays gave me the code to put in the returning page. This code works but the problem is I don't want to write the information to a file but to a database I know how to write to a database. Here is the problem, for testing purposes I thought right lets output some of the stuff written to the file. See in bold. It will not output what's in the form variable under any circumstances. This has never been a problem for me in the past. Then I thought right put a textbox or label on the page and output to that for e.g.
Label1.Text = Request.Form("oid")
or
TextBox1.Text = Request.Form("oid")
Neither of the above work. Then I thought right put the values into session variables then to a redirect to another page on my site and pull the info I need from the sess variables but Server.Transfer refuses to work. I mean WTF. This is driving me nuts. Any ideas?
Code:
Public Class Response
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim fs, fname, path, timestamp
If Request.ServerVariables("request_method") = "POST" Then
[B]Response.Write (Request.Form("oid"))[/B]
fs = Server.CreateObject("Scripting.FileSystemObject")
path = "c:\" 'set your logfile directory path here
timestamp = Day(Date.Now) & "-" & Month(Date.Now) & "-" & Year(Date.Now)
timestamp = timestamp & "--" & Hour(Now) & "-" & Minute(Now) & "-" & Second(Now)
fname = fs.CreateTextFile(path & timestamp & "-" & Request.Form("oid") & ".log", True)
fname.WriteLine("OrderID - " & Request.Form("oid"))
fname.WriteLine("Transaction Status - " & Request.Form("transactionstatus"))
fname.WriteLine("Total - " & Request.Form("total"))
fname.WriteLine("ClientID - " & Request.Form("clientid"))
fname.WriteLine("Transaction Time Stamp - " & Request.Form("datetime"))
fname.Close()
fname = Nothing
fs = Nothing
End If
End Sub
End Class
Last edited: