You could return a 307 redirect response, which would instruct the browser to re-post the data to the new URL, but the browser will then likely prompt the user to confirm they want to re-post the data. This will likely be confusing to the user, so should probably be avoided.
If you just need the data posted directly to the payment gateway, but you don't need it posted to your own server at all, then all you have to do is change the "action" attribute of the form to point to the appropriate external URL. If it is a web2py form, something like: form = FORM(..., _action=third_party_url) If you need to receive the data on your server first and then have it posted to the gateway, you would not use a redirect. Instead, just have the form post to web2py as usual, and in the controller, send the post request to the gateway using urllib2 or the requests library. Anthony On Saturday, July 4, 2015 at 7:45:24 AM UTC-4, Sepehr Mohamadi wrote: > > Hi Everybody, > > I want to redirect navigation to an outside URL with a POST Method. > > I should send payment info to a payment gateway through a POST Method. > Then payment gateway again callback to web2py with results. > > I searched everywhere in the Internet, Web2py Book and this forum, but > could not find a clue! > > Please guide! > Thanks, > Sepehr > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

