the security header is invalid error means there is a problem with the API Credentials.
There are 3 places the API Credentials are added for Express checkout:
1 on the checkout page in the Authenticate transaction for PayPal Express
2 on the pp_confirrn page in the get payer profile and the process transaction with paypal express, make sure to change the API credentials in all 3 places.