<?xml version="1.0"?>
<t t-name="website_sale.payment_confirmation_status">
        <div class="oe_website_sale_tx_status mt-3" t-att-data-order-id="order.id" t-att-data-order-tracking-info="json.dumps(order_tracking_info)">
            <t t-set="tx_sudo" t-value="order.get_portal_last_transaction()"/>
            <div t-attf-class="alert px-3 pb-0 pt-3 #{                     (tx_sudo.state == 'pending' and 'alert-info') or                     (tx_sudo.state == 'done' and order.amount_total == tx_sudo.amount and 'alert-success') or                     (tx_sudo.state == 'done' and order.amount_total != tx_sudo.amount and 'alert-warning') or                     (tx_sudo.state == 'authorized' and 'alert-success') or                     'alert-danger'}" role="alert">
                <a title="Edit" class="btn btn-sm btn-link text-dark float-end" role="button" groups="base.group_system" target="_blank" aria-label="Edit" t-attf-href="/odoo/action-payment.action_payment_provider/{{tx_sudo.provider_id.id}}">
                    <i class="fa fa-pencil"/>
                </a>
                <div>
                    <t t-if="tx_sudo.state == 'pending'">
                        <t t-out="tx_sudo.provider_id.sudo().pending_msg"/>
                    </t>
                    <t t-if="tx_sudo.state == 'done'">
                        <span t-if="tx_sudo.provider_id.sudo().done_msg" t-out="tx_sudo.provider_id.sudo().done_msg"/>
                    </t>
                    <t t-if="tx_sudo.state == 'done' and order.amount_total != tx_sudo.amount">
                        <span>Unfortunately your order can not be confirmed as the amount of your payment does not match the amount of your cart.
                        Please contact the responsible of the shop for more information.</span>
                    </t>
                    <t t-if="tx_sudo.state == 'cancel'">
                        <t t-out="tx_sudo.provider_id.sudo().cancel_msg"/>
                    </t>
                    <t t-if="tx_sudo.state == 'authorized'">
                        <t t-if="tx_sudo.provider_id.sudo().auth_msg" t-out="tx_sudo.provider_id.sudo().auth_msg"/>
                        <span t-else="">Your payment has been authorized.</span>
                    </t>
                    <t t-if="tx_sudo.state == 'error'">
                        <span t-esc="tx_sudo.state_message"/>
                    </t>
                </div>
                <t t-if="tx_sudo.provider_code == 'custom'">
                    <div id="order_reference" t-if="order.reference" class="mt-2">
                        <b>Communication: </b><span t-esc="order.reference"/>
                    </div>
                    <div t-if="tx_sudo.provider_id.sudo().qr_code">
                        <t t-set="qr_code" t-value="tx_sudo.company_id.partner_id.bank_ids[:1].build_qr_code_base64(order.amount_total,tx_sudo.reference, None, tx_sudo.currency_id, tx_sudo.partner_id)"/>
                        <div class="mt-2" t-if="qr_code">
                            <h3>Or scan me with your banking app.</h3>
                            <img class="border border-dark rounded" t-att-src="qr_code"/>
                        </div>
                    </div>
                </t>
            </div>
        </div>
    </t>

    