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, shopware may select this payment type with `FormPreserverPlugin` (#70)
  • Loading branch information
rommelfreddy authored Sep 17, 2024
1 parent 4847544 commit 42529e7
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 42529e7

Please sign in to comment.