Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"Unzer\\UnzerPayment\\": "./src/"
}
}
}
}
13 changes: 12 additions & 1 deletion src/Controller/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,15 @@ public function getPaymentList()

return $paymentList;
}
}

/**
* Checks if paymentId is an unzer payment
*
* @return bool
*
*/
public function isUnzerPaymentMethod(string $paymentId): bool
{
return UnzerpaymentHelper::getInstance()->isUnzerPaymentMethod($paymentId);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% extends "page/checkout/payment.html.twig" %}

{% block select_payment %}

{% if oView.isUnzerPaymentMethod(sPaymentID) %}
<div class="payment-option" style="margin-bottom: 3px;">
<div class="payment-option-form">
<input class="form-check-input" id="payment_{{ sPaymentID }}" type="radio" name="paymentid" value="{{ sPaymentID }}" {% if oView.getCheckedPaymentId() == paymentmethod.oxpayments__oxid.value %}checked{% endif %}>
<label class="form-check-label" for="payment_{{ sPaymentID }}">
<img src="{{ paymentmethod.getIcon() }}" style="max-width: 40px; height: auto; vertical-align: middle">
{{ paymentmethod.oxpayments__oxdesc.value }}
</label>
</div>
<div class="payment-option-info{% if oView.getCheckedPaymentId() == paymentmethod.oxpayments__oxid.value %} activePayment{% endif %}">
{% if paymentmethod.oxpayments__oxlongdesc.value|striptags|trim %}
<div class="desc">
{{ paymentmethod.oxpayments__oxlongdesc.getRawValue() }}
</div>
{% endif %}
</div>
</div>
{% else %}
{{ parent() }}
{% endif %}

{% endblock %}