question

revanth avatar image
revanth asked ·

Failed to find or resize iframe in Clover Hosted iframe integration

When I try to implement the Clover Hosted IFrame in our website by following https://docs.clover.com/docs/using-the-clover-hosted-iframe. After creating form and Clover elements, when I try to mount the elements, it's showing "

Uncaught Error: Failed to find or resize iframe for card-number

at Object.t.resizeFrame

"

Paymentsclover developer community
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered ·

Here is a codepen with an example, make sure you change the PAKMS token - https://codepen.io/gareth-dsouza/pen/PoPEypO.

7 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The codepen is working good but when I have taken the same code and tried on my website, I am getting an error at "const element = clover.elements();"=>

Uncaught TypeError: Cannot read property 'appendChild' of null

at e.elements

0 Likes 0 ·

There must be a difference between your code and the codepen, take a closer look. I assume you replaced the pakms token with your token in the initialization?

0 Likes 0 ·
revanth avatar image revanth David Marginian ♦♦ ·

Yes, I replaced my PAKMS token in the initialization and a clover object is returned. the immediate line after initialization is throwing error to call elements from Clover. I tried changing both Sandbox and Production sdk.js paths, but the error remains the same.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community