I am trying to incorporate a Redsys inSite payment gateway in my website. There are only a few steps to follow, and I can't find the way to load the iframe into the page.
Details
The code I use:
Redsys script:
<script src="https://sis-t.redsys.es:25443/sis/NC/sandbox/redsysV2.js"></script>
Body attr:
<body onload="loadRedsysForm()">
HTML div for iframe and inputs for the response:
<div class="redsys_form">
<div id="card-form"></div>
<input type="hidden" id="token" >
<input type="hidden" id="errorCode" >
<!-- <a href="javascript:alert(document.datos.token.value + '--' + document.datos.errorCode.value)"> ver</a> -->
</div>
Js:
/**
* Redsys insite
*/
getInSiteForm('card-form', '', '', '', '', 'Pagar', '352655252', '001', '0263-40');
function merchantValidationEjemplo(){
//Insertar validaciones…
return true;
}
<!-- Listener de recepción de ID de operación -->
window.addEventListener("message", function receiveMessage(event) {
storeIdOper(event,"token", "errorCode", "merchantValidationEjemplo");
});
Screenshot of the error:
'Error' message appearing on screen
I have no idea where to find the answer, I hope some of you can help.
Thank you for your time!