Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to initialize Frames - Checkout.com CDN not present. #57

Open
gopakumar-gt opened this issue Jun 12, 2024 · 0 comments
Open

Fail to initialize Frames - Checkout.com CDN not present. #57

gopakumar-gt opened this issue Jun 12, 2024 · 0 comments

Comments

@gopakumar-gt
Copy link

Type: Bug
Error: Checkout.com CDN not present. Perhaps you forgot to add <script src="https://cdn.checkout.com/js/framesv2.min.js"></script> to your index.html file.

This issue is happening on live over SSL, when I was running locally it was not happening.

On initialization, it throws a console error

Checkout.com CDN not present. 
Perhaps you forgot to add <script src="https://cdn.checkout.com/js/framesv2.min.js"></script> 
to your index.html file.

But the in the source I can see the script

Later investigating, I found a workaround Frames.js

document.querySelector('script[src$="https://cdn.checkout.com/js/framesv2.min.js"]')

was returning null.
When you change following in Frames.js

     Frames.prototype.componentDidMount = function () {
-        var existingScript = document.querySelector("script[src$=\"".concat(config_1.CDN, "\"]"));
+        var existingScript = document.querySelector("script[src~=\"".concat(config_1.CDN, "\"]"));
         if (!existingScript) {
             console.error("Checkout.com CDN not present. Perhaps you forgot to add <script src=\"".concat(config_1.CDN, "\"></script> to your index.html file."));
         }

the Frames initiating properly.

Please look into this issue and provide a fix at the earliest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant