Skip to content

Commit

Permalink
RATESWSX-312: installment: fix issue that if payment-type is not avai…
Browse files Browse the repository at this point in the history
…lable, shopwre may select this payment type with `FormPreserverPlugin`

see issue for detailed information
  • Loading branch information
rommelfreddy committed Sep 13, 2024
1 parent 6733ab0 commit e610f52
Showing 1 changed file with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,27 @@
{% set code_directDebit = constant('Ratepay\\RpayPayments\\Components\\ProfileConfig\\Model\\ProfileConfigMethodInstallmentEntity::PAYMENT_TYPE_DIRECT_DEBIT') %}
{% set code_bankTransfer = constant('Ratepay\\RpayPayments\\Components\\ProfileConfig\\Model\\ProfileConfigMethodInstallmentEntity::PAYMENT_TYPE_BANK_TRANSFER') %}

<input type="radio"
name="ratepay[installment][paymentType]"
class="rp__installment__paymentType"
id="rp__installment__paymentType_directDebit"
value="{{ code_directDebit }}"
form="confirmOrderForm"
{% if ratepay.installment.plan.payment.default == code_directDebit %}checked="checked"{% endif %}
/>
<input type="radio"
name="ratepay[installment][paymentType]"
class="rp__installment__paymentType"
id="rp__installment__paymentType_bankTransfer"
value="{{ code_bankTransfer }}"
form="confirmOrderForm"
{% if ratepay.installment.plan.payment.default == code_bankTransfer %}checked="checked"{% endif %}
/>
{% if ratepay.installment.plan.payment.directDebitAllowed %}
<input type="radio"
name="ratepay[installment][paymentType]"
class="rp__installment__paymentType"
id="rp__installment__paymentType_directDebit"
value="{{ code_directDebit }}"
form="confirmOrderForm"
{% if ratepay.installment.plan.payment.default == code_directDebit %}checked="checked"{% endif %}
/>
{% endif %}

{% if ratepay.installment.plan.payment.bankTransferAllowed %}
<input type="radio"
name="ratepay[installment][paymentType]"
class="rp__installment__paymentType"
id="rp__installment__paymentType_bankTransfer"
value="{{ code_bankTransfer }}"
form="confirmOrderForm"
{% if ratepay.installment.plan.payment.default == code_bankTransfer %}checked="checked"{% endif %}
/>
{% endif %}

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

0 comments on commit e610f52

Please sign in to comment.