the error indicates that the transaction is being sent to the sandbox server using the the live API credentials.
try changing this code:
$nextIndex = count($WA_PP_ECO_Set_params[0]);
if ($row_rs_xyz[xyzPayPalSandProd] == 'sandbox') {
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
$WA_PP_ECO_Set_params[1][$nextIndex] = "true";
} else { // Use Production PayPal
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
$WA_PP_ECO_Set_params[1][$nextIndex] = "false";
}
to:
$nextIndex = count($WA_PP_ECO_Set_params[0]);
/*if ($row_rs_xyz[xyzPayPalSandProd] == 'sandbox') {
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
$WA_PP_ECO_Set_params[1][$nextIndex] = "true";
} else { // Use Production PayPal*/
$WA_PP_ECO_Set_params[0][$nextIndex] = "UseSandbox";
$WA_PP_ECO_Set_params[1][$nextIndex] = "false";
/* }*/
it would seem that the code is not properly setting it to the production server.