{% extends 'dashboard/layout.html' %}
{% load currency_filters %}
{% load i18n %}

{% block title %}
    {% trans "WebPay Transaction" %} {{ txn.pnref }} | {{ block.super }}
{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumb">
        <li>
            <a href="{% url 'dashboard:index' %}">{% trans "Dashboard" %}</a>
            <span class="divider">/</span>
        </li>
        <li>
            WebPay <span class="divider">/</span>
        </li>
        <li>
            <a href="{% url 'webpay-transaction-list' %}">{% trans "WebPay transactions" %}</a>
            <span class="divider">/</span>
        </li>
        <li class="active">{{ txn.id }}</li>
    </ul>
{% endblock %}

{% block headertext %}
    {% blocktrans with id=txn.id %}
        Transaction {{ id }}
    {% endblocktrans %}
{% endblock %}

{% block dashboard_content %}
    <table class="table table-striped table-bordered">
        <tbody>
            <tr><th>{% trans "Correlation ID" %}</th><td>{{ txn.id }}</td></tr>
            <tr><th>{% trans "Method" %}</th><td>{{ txn.method }}</td></tr>
            <tr><th>{% trans "Amount" %}</th><td>{{ txn.amount|default:"-" }}</td></tr>
            <tr><th>{% trans "Currency" %}</th><td>{{ txn.currency }}</td></tr>
            <tr><th>{% trans "Result" %}</th><td>{{ txn.ack }}</td></tr>
            <tr><th>{% trans "Token" %}</th><td>{{ txn.token|default:"-" }}</td></tr>
            <tr><th>{% trans "Error code" %}</th><td>{{ txn.error_code|default:'-' }}</td></tr>
            <tr><th>{% trans "Error message" %}</th><td>{{ txn.error_message|default:"-" }}</td></tr>
            <tr><th>{% trans "Request params" %}</th><td>{{ txn.request|safe }}</td></tr>
            <tr><th>{% trans "Response params" %}</th><td>{{ txn.response|safe }}</td></tr>
            <tr><th>{% trans "Date" %}</th><td>{{ txn.date_created }}</td></tr>
        </tbody>
    </table>
{% endblock dashboard_content %}
