custom/plugins/MolliePayments/src/Resources/views/mollie/component/apple-pay-direct-button.twig line 1

Open in your IDE?
  1. {% block mollie_apple_pay_direct %}
        <div class="mollie-apple-pay-direct {{ cols }}">
            {% 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 %}
    
            <input type="hidden" name="id" value="{{ productId }}"/>
            <input type="hidden" name="currency" value="{{ context.currency.translated.shortName }}"/>
            <input type="hidden" name="countryCode" value="{{ context.shippingLocation.country.iso }}"/>
    
            {% if productId %}
                {% set mode = 'productMode' %}
            {% else %}
                {% set mode = 'cartMode' %}
            {% endif %}
    
            <input type="hidden" name="mode" value="{{ mode }}"/>
    
            {% block mollie_apple_pay_direct_button %}
                <button type="submit" data-shop-url="{{ seoUrl('frontend.home.page') }}" class="btn btn-primary btn-block btn-buy apple-pay-button-with-text apple-pay-button-black js-apple-pay w-100 d-none">
                    {# space to match height other buttons #}
                    &nbsp;
                    {# end important spacer #}
                </button>
            {% endblock %}
        </div>
    {% endblock %}