Form post / receive in code behind
Posted on 2004-10-21
Firstly... sorry if this seems like a strange question for people but I've googled around and I can't seem to find any help. :)
I've been asked to integrate some asp.net pages with an online payment service provider that takes a number of variables in the the form of a post from a page on our site. I've written this for testing purposes and I've realised that I've got to store some values in the page that I'd rather not be seen (easily) by the user for security reasons. The basic testing form i'm using is as follows:
<form id="frmDataEnter" method="post" action="https://www.domain.com/dataprocess.cfm">
<INPUT type="hidden" id="LOGIN" name="LOGIN" value="I'd rather the user couldn't view source and see this">
<INPUT type="hidden" id="INTERNAL" name="INTERNAL" value="This either ideally">
<P>Test Amount: <INPUT id="AMOUNT" name="AMOUNT" value="50.00"></P>
<P><INPUT type="submit" value="Submit for testing"></P>
Is there any way I can form the correct POST values together in the backend and submit from there? I appreciate that there are still ways that the user can view what they submitted, but I'd rather that it was slightly more troublesome than just viewing the source of the pre-process page.
Related to this - At some point during the process, the payment processing site sends a bunch of data back in a silent post. The payment processing site then waits for a "200 success" message before allowing the user to continue the process. At the moment I am collecting this data my means of a standard aspx page that grabs the post values on the form load event (Request.Form("Whatever")) and puts them in a database. The page doesn't output anything, just simply processes the values and loads blank. Should I be handling this another way? Are there any other types of page that I should be using for this functionality? Or is the fact that the processing site waits for a "200 success" message limiting me to html / aspx.
Again, sorry if this question seems a little unnecessary (It works as it is), but I like to make sure I am doing things properly rather than just hacking my way along!