Skip to content

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

Closed
@gopakumar-gt

Description

@gopakumar-gt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions