The answer to your question is true
For both accepting and rejecting, thank the employer for the wonderful opportunity that was given. When accepting state that you are happy with the employment terms, and the salary that was given. When rejecting tell the employer thank you, but simply state how there may have been better opportunities, or how the job was not the right fit for you. Both should be done either by email or phone.
Exploding i’m pretty sure lol