{% if show_test_cards %}
    <div class="alert">
        Realex Test mode. <br/>
        Successful Card: 4263 9700 0000 5262 <br/>
        Declined Card: 4000 1200 0000 1154
    </div>
{% endif %}

<script src="/plugins/Realex/js/rxp-js.js"></script>

<button id="realexButton" class="button">Pay now</button>

<script>

    console.debug("Endpoint: {{ endpoint }}");
    console.debug("Return URL: {{ return_url }}");

    RealexHpp.setHppUrl("{{ endpoint }}");
    RealexHpp.lightbox.init(
        "realexButton",
        "{{ return_url }}",
        {{ jsonFromRequestEndpoint | raw }}
    );

</script>

