Events
completed​
If windowstate = 4, this function is called when the payment window is closed.
Please note the highlighted line in the example below.
<div id="payment-div"></div>
<script type="text/javascript">
function PaymentWindowReady()
{
paymentwindow = new PaymentWindow({
'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
'amount': "10095",
'currency': "DKK",
'windowstate': "4",
'iframeheight': "400",
'iframewidth': "360"
});
paymentwindow.on('completed', function(params){ alert('The Payment Window was completed: ' + params); });
paymentwindow.append('payment-div');
paymentwindow.open();
}
</script>
<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>
declined​
If windowstate = 4, this function is called when a payment is declined.
Please note the highlighted line in the example below.
<div id="payment-div"></div>
<script type="text/javascript">
function PaymentWindowReady()
{
paymentwindow = new PaymentWindow({
'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
'amount': "10095",
'currency': "DKK",
'windowstate': "4",
'iframeheight': "400",
'iframewidth': "360"
});
paymentwindow.on('declined', function(){ alert('The Payment Window was declined'); });
paymentwindow.append('payment-div');
paymentwindow.open();
}
</script>
<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>