Effectuer un paiement

Effectuer un paiement

 window.addEventListener("DOMContentLoaded", function() { var targetiframe = document.getElementById("payment"); var listener = function (event) { var cpmessage = event.data.split(':'); //console.log(cpmessage, event, jQuery(targetiframe).width()); var cpvar = cpmessage[0]; if (cpvar == "height") { if(parseInt(cpmessage[1]) < 100) { if(jQuery(targetiframe).width() < 600) { targetiframe.style.height = '2500px'; }else{ targetiframe.style.height = '2000px'; } }else{ targetiframe.style.height = (Math.round(cpmessage[1]) + 500) + 'px'; } } else if (cpvar == "formError") { } } // Setup the listener. if (window.addEventListener) { addEventListener("message", listener, true); } else { attachEvent("onmessage", listener); } }, false);