{% sw_extends '@Framework/documents/invoice.html.twig' %}
{% set payPalPuiPaymentInstruction = null %}
{% set customFieldKey = constant('Swag\\PayPal\\SwagPayPal::ORDER_TRANSACTION_CUSTOM_FIELDS_PAYPAL_PUI_INSTRUCTION') %}
{% set payPalPuiPaymentInstruction = order.transactions.last.customFields[customFieldKey] %}
{% block document_payment %}
{% if payPalPuiPaymentInstruction and payPalPuiPaymentInstruction.payment_due_date is defined %}
{{ 'paypal.payUponInvoice.document.paymentShippingInfo.payPalPuiPaymentMethod'|trans() }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block document_payment_shipping %}
{{ parent() }}
{% if payPalPuiPaymentInstruction %}
{% if payPalPuiPaymentInstruction.payment_due_date is not defined %}
{{ "paypal.payUponInvoice.instructions.table.bank"|trans() }} | {{ payPalPuiPaymentInstruction.recipient_banking_instruction.bank_name }} |
---|---|
{{ "paypal.payUponInvoice.instructions.table.iban"|trans() }} | {{ payPalPuiPaymentInstruction.recipient_banking_instruction.international_bank_account_number }} |
{{ "paypal.payUponInvoice.instructions.table.bic"|trans() }} | {{ payPalPuiPaymentInstruction.recipient_banking_instruction.bank_identifier_code }} |
{{ "paypal.payUponInvoice.instructions.table.holder"|trans() }} | {{ payPalPuiPaymentInstruction.recipient_banking_instruction.account_holder_name }} |
{{ "paypal.payUponInvoice.instructions.table.amount"|trans() }} | {{ payPalPuiPaymentInstruction.amount.value }}{{ payPalPuiPaymentInstruction.amount.currency }} |
{{ "paypal.payUponInvoice.instructions.table.reference"|trans() }} | {{ payPalPuiPaymentInstruction.reference_number }} |