{% block mollie_apple_pay_direct %}
{% if page.product %} {# this is for older shopware versions #} {% set productId = page.product.id %} {% else %} {# this is for Shopware >= 6.4 #} {% set productId = product.id %} {% endif %} {% if mollie_csrf_available %} {# CSRF functions are not available anymore since Shopware 6.5. To avoid function-not-found exception we have to conditionally fetch the required code from a separate file. #} {% sw_include '@MolliePayments/storefront/csrf/components/apple-pay-direct-button-csrf.twig' %} {% endif %} {% if productId %} {% set mode = 'productMode' %} {% else %} {% set mode = 'cartMode' %} {% endif %} {% block mollie_apple_pay_direct_button %} {% endblock %}
{% endblock %}