Skip to content

Commit e610f52

Browse files
committed
RATESWSX-312: installment: fix issue that if payment-type is not available, shopwre may select this payment type with FormPreserverPlugin
see issue for detailed information
1 parent 6733ab0 commit e610f52

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

src/Resources/views/storefront/installment-calculator/installment-plan.html.twig

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,27 @@
130130
{% set code_directDebit = constant('Ratepay\\RpayPayments\\Components\\ProfileConfig\\Model\\ProfileConfigMethodInstallmentEntity::PAYMENT_TYPE_DIRECT_DEBIT') %}
131131
{% set code_bankTransfer = constant('Ratepay\\RpayPayments\\Components\\ProfileConfig\\Model\\ProfileConfigMethodInstallmentEntity::PAYMENT_TYPE_BANK_TRANSFER') %}
132132

133-
<input type="radio"
134-
name="ratepay[installment][paymentType]"
135-
class="rp__installment__paymentType"
136-
id="rp__installment__paymentType_directDebit"
137-
value="{{ code_directDebit }}"
138-
form="confirmOrderForm"
139-
{% if ratepay.installment.plan.payment.default == code_directDebit %}checked="checked"{% endif %}
140-
/>
141-
<input type="radio"
142-
name="ratepay[installment][paymentType]"
143-
class="rp__installment__paymentType"
144-
id="rp__installment__paymentType_bankTransfer"
145-
value="{{ code_bankTransfer }}"
146-
form="confirmOrderForm"
147-
{% if ratepay.installment.plan.payment.default == code_bankTransfer %}checked="checked"{% endif %}
148-
/>
133+
{% if ratepay.installment.plan.payment.directDebitAllowed %}
134+
<input type="radio"
135+
name="ratepay[installment][paymentType]"
136+
class="rp__installment__paymentType"
137+
id="rp__installment__paymentType_directDebit"
138+
value="{{ code_directDebit }}"
139+
form="confirmOrderForm"
140+
{% if ratepay.installment.plan.payment.default == code_directDebit %}checked="checked"{% endif %}
141+
/>
142+
{% endif %}
143+
144+
{% if ratepay.installment.plan.payment.bankTransferAllowed %}
145+
<input type="radio"
146+
name="ratepay[installment][paymentType]"
147+
class="rp__installment__paymentType"
148+
id="rp__installment__paymentType_bankTransfer"
149+
value="{{ code_bankTransfer }}"
150+
form="confirmOrderForm"
151+
{% if ratepay.installment.plan.payment.default == code_bankTransfer %}checked="checked"{% endif %}
152+
/>
153+
{% endif %}
149154

150155
{% if ratepay.installment.plan.payment.directDebitAllowed %}
151156
{# only show sepa form if the payment method is available #}

0 commit comments

Comments
 (0)