To troubleshoot, If you are testing using Express Checkout, add the following to the pp_checkout_failure.php page:
<?php
if(!session_id()) session_start();
echo("Auth request: ".isset($_SESSION['ECO_Auth_Request'])?$_SESSION['ECO_Auth_Request']:""."<br /><br />");
echo("Auth Result: ".isset($_SESSION['"ECO_Auth_Result'])?$_SESSION['ECO_Auth_Result']:""."<br /><br />");
echo("Get Request: ".isset($_SESSION['ECO_Get_Request'])?$_SESSION['ECO_Get_Request']:""."<br /><br />");
echo("Get Result: ".isset($_SESSION['ECO_Get_Result'])?$_SESSION['"ECO_Get_Result']:""."<br /><br />");
echo("Preocess request: ".isset($_SESSION['"ECO_Process_Request'])?$_SESSION['ECO_Process_Request']:""."<br /><br />");
echo("Process Result: ".isset($_SESSION['ECO_Process_Result'])?$_SESSION['ECO_Process_Result']:""."<br /><br />");
?>
If you are filling in the checkout form on the checkout page, add the following to the checkout_failure.php page:
<?php
if(!session_id()) session_start();
echo("PayPal Full Request :<br />");
echo("<code>".isset($_SESSION["PP_DirectPayment_postedValues"])?$_SESSION["PP_DirectPayment_postedValues"]:""."</code><br /><br />");
echo("Paypal Full Response :<br />");
echo("<code>".isset($_SESSION["PP_DirectPayment"])?$_SESSION["PP_DirectPayment"]:""."</code><br /><br />");
echo("USPS Full Request :<br />");
echo("<code>".isset($_SESSION["WA_Store_Cart_USPS_FullRequest"])?$_SESSION["WA_Store_Cart_USPS_FullRequest"]:""."</code><br /><br />");
echo("USPS Full Response :<br />");
echo("<code>".isset($_SESSION["WA_Store_Cart_USPS_FullResponse"])?$_SESSION["WA_Store_Cart_USPS_FullResponse"]:""."</code><br /><br />");
?>
This will write the request that is sent to paypal as well as the response that is returned to the screen so we can get an idea of what is going wrong.
NOTE: The request will contain you api information, you should remove that portion when posting it on the forum.