That code wont *fix* the problem it only displays the error that is being returned from paypal which you have already reported back as the Security header Not valid.
This code:
<?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("Process 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 />");
?>
will sow the results from using express checkout. it goes on the pp_checkout_failure.php page after the <body> tag
to show the response when using The checkout form on the checkout page, add this code to the checkout_failure.php page after the <body> tag:
<?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 />");
?>
The error you are reporting, "Security error Security header is not valid" is a problem with the API Credentials you are using.
make sure you are entering them properly in the WA_Globals.php file.
Copy and paste them directly from the paypal site to make sure they are entered exactly.
Look for a leading or trailing space in the values. for example:
$WAGLOBAL_Paypal_Signature = "<signature> ";
$WAGLOBAL_Paypal_Signature = "<signature>";
Try requesting a new one from paypal if your still having problems.
At the end of the day, the cause of that error is a problem in the API values you are entering.