question

revanth avatar image
revanth asked vloev edited

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

"

clover developer community
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

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

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

revanth avatar image revanth commented ·

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 ·
David Marginian avatar image David Marginian ♦♦ revanth commented ·

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 ♦♦ commented ·

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
vloev avatar image
vloev answered vloev edited

@revanth did you find the solution?


10 |2000

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

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