In the first, you are POSTing directly to ereceipts-server.com. In the second, the request is going through a different server, however it is specified in your Transport() function.
We might need to see your Transport() function. Are you able to determine if web2py is returning the 400 error or the web server? Is it generating an error in the web2py error logs? Is the POST even making it to the ereceipts-server.com server? Or it could be failing at the proxy server. Proxy situations are difficult to debug. While it's good to know what your server is sending, it's much better to know what the proxy server is sending and what the destination server is receiving.