{% extends "base.html" %} {% load i18n %} {% block title %}{% trans "Payment Details" %}{% endblock %} {% block content %}

{% trans "Payment Details" %}

{% if payment.status == 'succeeded' %} {% elif payment.status == 'pending' %} {% elif payment.status == 'failed' %} {% elif payment.status == 'refunded' %} {% else %} {% endif %} {% trans "Payment Status:" %} {{ payment.get_status_display }}
{% if payment.is_succeeded %} {% endif %}

{% trans "Payment Information" %}

{% trans "Payment ID:" %} {{ payment.id }}
{% trans "Amount:" %} ${{ payment.amount }} {{ payment.currency }}
{% trans "Payment Type:" %} {{ payment.get_payment_type_display }}
{% trans "Date:" %} {{ payment.created_at|date:"M d, Y H:i" }}
{% if payment.stripe_payment_intent_id %} {% endif %} {% if payment.stripe_subscription_id %} {% endif %}
{% trans "Description:" %} {{ payment.description }}
{% trans "Stripe Payment ID:" %} {{ payment.stripe_payment_intent_id }}
{% trans "Stripe Subscription ID:" %} {{ payment.stripe_subscription_id }}
{% trans "Last Updated:" %} {{ payment.updated_at|date:"M d, Y H:i" }}
{% if payment.credit_transaction %}

{% trans "Credit Information" %}

{% if payment.credit_transaction.expires_at %} {% endif %}
{% trans "Credits Added:" %} +{{ payment.credit_transaction.amount }} {% trans "credits" %}
{% trans "Credit Type:" %} {{ payment.credit_transaction.get_credit_type_display }}
{% trans "Expires:" %} {{ payment.credit_transaction.expires_at|date:"M d, Y" }}
{% endif %} {% if payment.subscription %}

{% trans "Subscription Information" %}

{% trans "Plan:" %} {% with stripe_product=payment.subscription.get_stripe_product %} {% if stripe_product %} {{ stripe_product.name }} {% else %} {% trans "Unknown Plan" %} {% endif %} {% endwith %}
{% trans "Status:" %} {{ payment.subscription.get_status_display }}
{% trans "Billing Period:" %} {{ payment.subscription.current_period_start|date:"M d" }} - {{ payment.subscription.current_period_end|date:"M d, Y" }}
{% endif %} {% if payment.receipt_data %}

{% trans "Receipt Details" %}

{% for key, value in payment.receipt_data.items %}
{{ key|title }}: {{ value }}
{% if forloop.counter|divisibleby:2 %}
{% endif %} {% endfor %}
{% endif %}
{% endblock %}