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. web2py also includes the fetch() function in gluon.tools, which uses urllib2 -- if your data are in a dictionary, you would do:
from gluon.tools import fetch
result = fetch(external_url, data)
You would want to check the result to make sure the post was successful.
Anthony