the error you are getting is:
Security header is not valid
This error means there is an issue with the credentials, either they are not Sandbox credentials, or you are passing the transacrtion through the live server.
To check if you are passing through the live server look for the following on the checkout page:
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
to use the sandbox, the next line should be set to true:
$WA_PP_ECO_Set_params[1][$nextIndex] = "true";
I'm not entirely sure the api username you are using is a Sandbox username, I thought the sandbox user names usually had 'test' in them somewhere, you should double check that these API credentials are actually tesst credentals.
See the following PDF for detail on getting sandbox API credentials:
paypal_sandbox.pdf