Thanks for your help. Thanks for showing me an example of yours, that really helped
It's now sorted. I'm not sure why all of a sudden i needed to enter the API details when the shop has been up and running for 6 years without it.
But i put in all the information and it's working fine now.
If anyone else is searching for this, you are given a choice on paypal when you request API details
Click Request API Credentials.
Click Request API signature.
You need to choose 2. I chose number 1 and was going round in circles for a while trying to input the wrong information. So i deleted number 1 and requested number 2 and got the right info.