Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleHere we provide an example of a script that will allow buyers to see the entire payment page within the boundaries of the existing iFrame.

After injecting the suggested script into the <header> , the width of the content will adapt to the dimensions of the iFrame.

Note

Note. It is recommended to specify a width of at least 320px.

Code Block
languagexml
<script>
    window.addEventListener('message', receiveMessage, false);
  
    function receiveMessage(event){   
        document.getElementById("iframe_name"). width = event.data.body.scrollWidth;
        document.getElementById("iframe_name"). width = event.data.body.scrollWidth;
    }
</script>