Hi all
I am trying to insert an order into my database, post some data to a third party payment system and redirect the user to the third party payment page all in the same method.
I can write to the database ok, I can post the data to the payment URL ok, but i cant redirect the user in the same action.
I have tried Server.TransferRequest but im getting a PlatformNotSupported exception (my host is running IIS6). I have also tried using a basic html form (which works) but doesnt allow me to execute additional code in the .cs file (to insert into the database and do thoer things).
I would really appreciate any suggestions as to how i can do this.
For reference, this is the code in my form button click event. I need something similar that works on IIS6 / .NET 2.0:
**used php formatting for clarity only***
[PHP]protected void Btn_Purchase(object sender, EventArgs e)
{
//insert order into database
Order o = (Order)Session["order"];
Customer c = (Customer)Session["customer"];
onlinepayments.OrderDAC.InsertOrder(o, c);
//create post data for payment site
NameValueCollection nv = new NameValueCollection(3);
nv.Add("epdqdata", encryptedData);
nv.Add("returnurl", "http://www.mysite.com");
nv.Add("merchantdisplayname", "MySite");
//transfer user and post data
Server.TransferRequest("https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdqEncTool.e", true, "POST", nv);
} [/PHP]
thanks in advance for any help...
:)