Cors issue with safecharge

I have the Nuvei script src=”https://cdn.safecharge.com/safecharge_resources/v1/websdk/safecharge.js” included in my test html page on test.xxxxx.com. It loads and works perfectly. I moved the same script to my pay site (pay.xxxxx.com) and get the error: Access to script at ‘https://cdn.safecharge.com/jstag/managed/34ff9876-a972-4543-9110-773743828c28/bf45ff99493982c0_complete.js’ from origin ‘https://pay.xxxxxx.com’ has been blocked by CORS policy: The ‘Access-Control-Allow-Origin’ header has a value ‘https://test.xxxxxx.com’ that is not equal to the supplied origin.
safecharge.js:10 GET https://cdn.safecharge.com/jstag/managed/34ff9876-a972-4543-9110-773743828c28/bf45ff99493982c0_complete.js net::ERR_FAILED 200
It is loading a secondary script, but I cannot understand why it is referencing the test site instead of the pay site. I checked the .htaccess and that has nothing in it. This has me baffled. Any suggestions would be greatly appreciated.