form within form / post to another server in .net/umbraco Options
Chandy
Posted: Tuesday, January 16, 2007 6:33:14 PM
Rank: Devotee

Joined: 11/16/2006
Posts: 55
Location: Scotland
Hi all,

Not really an umbraco question per-se but it's on a site I am doing in umbraco and you guys are all .net gurus so I thought I'd ask :)

Standard payment gateway scenario in .net, how do you handle it? Used to be you had a form that submitted to your payment provider, which sent the user to their site along with the right values etc., great. Now with .net, you can't modify the form action so that technique is not available. Ok, so what about response.redirect? Well, that only does GET requests and we don't want amount=200 or whatever in the url do we so that's out. Okay, server.transfer? Sound ideal as all form parameters are sent to the target page..except it can't transfer to another server :( What about another form within the existing .net form on the aspx page? No, sorry, as well as creating invalid HTML, the submit button on the inner form will just submit the .net form.

So, how are we supposed to do this? I have seen some posts elsewhere about using the WebClient class to effecively proxy the requests, or using webservices. These sound fine until you read up on PCI Compliance and find that, if the user enters the card data on your site, you have to be PCI Compliant, and that will cost you.

So, any ideas you gurus? I am about to resort to trying to modify the form action in the render method of the page once I am happy with the validation!

Craig
Tobbe
Posted: Tuesday, January 16, 2007 10:07:02 PM
Rank: Devotee

Joined: 7/19/2006
Posts: 97
A really dirty way of doing it is to add a
Code:

</form>
<form action="yoururl.aspx" method="post">
** Your form **



to the bottom for your page
Chandy
Posted: Wednesday, January 17, 2007 12:04:14 PM
Rank: Devotee

Joined: 11/16/2006
Posts: 55
Location: Scotland
GENIUS!

I didn't think of that one..and it's about the only way I can see to do it :)

Thanks!!!
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.