Please wait ...


Loading...

Integration

Integration of the payment window

There are two ways of integrating the payment window:

  • Simple: JavaScript integration
  • Advanced: POST/GET submission

Simple

This is the easiest way to integrate Bambora as it requires only a minimum of programming experience. All necessary code is automatically generated by the included JavaScript.

Examples

Simple: Overlay

<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>
<script type="text/javascript">
    paymentwindow = new PaymentWindow({
        'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
        'amount': "10095",
        'currency': "DKK"
    });
</script>

<input onclick="javascript: paymentwindow.open()" type="button" value="Go to payment">

Simple: Integrated payment form

<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>
<div id="payment-div"></div>
<script type="text/javascript">
    paymentwindow = new PaymentWindow({
        'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
        'amount': "10095",
        'currency': "DKK",
        'windowstate': "4",
        'paymentcollection': "1",
        'iframeheight': "400",
        'iframewidth': "360",
        'accepturl': "http://www.epay.dk"
    });
    paymentwindow.append('payment-div');
    paymentwindow.open();
</script>

Simple: Iframe

<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>
<div id="payment-div"></div>
<script type="text/javascript">
    paymentwindow = new PaymentWindow({
        'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
        'amount': "10095",
        'currency': "DKK",
        'windowstate': "2"
    });
    paymentwindow.append('payment-div');
    paymentwindow.open();
</script>

Simple: Overlay with language set to English and orderid set to 154

<script charset="UTF-8" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" type="text/javascript"></script>
<script type="text/javascript">
    paymentwindow = new PaymentWindow({
        'merchantnumber': "ENTER YOUR MERCHANT NUMBER HERE",
        'amount': "10095",
        'currency': "DKK",
        'language': "2",
        'orderid': "154"
    });
</script>

<input onclick="javascript: paymentwindow.open()" type="button" value="Go to payment">

Advanced

This method is for advanced users only. The integration is based on building an HTML form and submitting it to the payment window by either POST or GET. The parameters must be defined in the input-fields (usualle these are of the type hidden).
It’s also possible to link to the payment window with the parameters set in GET.

The URL to use is: https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx

Examples

Advanced: POST

<form action="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx" method="post">
    <input name="merchantnumber" value="ENTER YOUR MERCHANT NUMBER HERE">
    <input name="amount" value="10495"> <input name="currency" value="DKK">
    <input name="windowstate" value="3"> <input type="submit" value=
    "Go to payment">
</form>

Advanced: GET

<form action="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx" method="get">
    <input name="merchantnumber" value="ENTER YOUR MERCHANT NUMBER HERE">
    <input name="amount" value="10495"> <input name="currency" value="DKK">
    <input name="windowstate" value="3"> <input type="submit" value="Go to payment">
</form>

Advanced: Link

<a href="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx?merchantnumber=99999999&amount=10495&currency=DKK&windowstate=3">Go to payment</a>