{% if (setting_so_onepagecheckout_layout_setting['payment_method_status'] == 1) %}
    <div class="checkout-content checkout-payment-methods">
        {% if (error_warning) %}
            <div class="alert alert-warning warning"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
            </div>
        {% endif %}
        {% if (payment_methods) %}
            <h2 class="secondary-title"><i class="fa fa-credit-card"></i>{{ text_title_payment_method }}</h2>
            <div class="box-inner">
                {% for payment_method in payment_methods %}
                    {% if (setting_so_onepagecheckout_layout_setting[payment_method['code'] ~ '_status'] is defined and setting_so_onepagecheckout_layout_setting[payment_method['code']~'_status'] == 1) %}
                        <div class="radio">
                            <label>
                                {% if (payment_method['code'] == code or not code or setting_so_onepagecheckout_layout_setting['so_onepagecheckout_default_payment'] == payment_method['code']) %}
                                    {% set code = payment_method['code'] %}
                                    <input type="radio" name="payment_method" value="{{ payment_method['code'] }}" checked="checked"/>
                                {% else %}
                                    <input type="radio" name="payment_method" value="{{ payment_method['code'] }}"/>
                                {% endif %}
                                {{ payment_method['title'] }}
                                {% if (payment_method['terms'] is defined and payment_method['terms']) %}
                                    ({{ payment_method['terms'] }})
                                {% endif %}
                            </label>
                        </div>
                    {% endif %}
                {% endfor %}
            </div>
        {% endif %}
    </div>
{% endif %}