sage pay server settings
For sage pay server to work on your site without leaving your site it must load from iframe. For that you have to set profile page to low that will
bring it in iframe so it will stay on your site. set transaction method to payment and set transaction server to test first to check how it works.
Then if it works fine you can set transaction server to live.
Here If your settings are as above explanation then also it’s not working and giving you “4020 error” then Add you IP to sege pay servers control