Sending 2 forms at a time


I must submit two forms at once and I don't want javascript. So I think I can post the form to myself, do my work and then post it on to the third-party payment provider. This is to make the order appear in our datastore. The manual says how to submit a form over HTTP POST but I don't know how to direct the user's browser to this page. Is there a way? Instead of posting the form directly to the third party I thought doing something like this:

  def post(self):
     import urllib
     #do my work
     params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
     f = urllib.urlopen("", params)
     #direct the user to the reponse page but how?

It will work to submit the form but the user must be take to the page. Is there a way to achieve this?

Thanks for any help

There is something you can do like this:

Get the post form, do stuff on your server, and then return a redirect page that contains a form with same params but action to the remote target.

Then, you can use little js to submit the form automatically, and give something like "Not redirecting? click here" to the user.

So it's not working as what you expected, and it used js too, but I did not find any better way to handle this job. Hope this can help in any way.