The code I posted above is only for troubleshooting the problem, to see what errors are being returned. it is not code to fix the problem, I f you need to change to the live usps server, you should change that in the WA_Globals.php file.
To troubleshoot using the code above, it should be added to between the body tags of the checkout failure page. When checkout fails, the code above will show the responses from PayPal and the shipping providers, using the responses you can get a better idea of where the problem is, and what needs to be fixed.