Skip to content

Commit

Permalink
NTR: bancomat pay numer ist noch required
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed May 6, 2024
1 parent 3be209e commit b637b0a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Handler/Method/BancomatPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Mollie\Api\Types\PaymentMethod;
use Shopware\Core\Checkout\Customer\CustomerEntity;
use Shopware\Core\Checkout\Order\OrderEntity;
use Shopware\Core\System\Locale\LocaleEntity;
use Shopware\Core\System\SalesChannel\SalesChannelContext;

class BancomatPayment extends PaymentHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% if context.paymentMethod.translated.customFields.mollie_payment_method_name == 'bancomatpay' %}
<div class="mollie-bancomat-pay">

<label for="mollieBancomatPayPhone">{{ "molliePayments.components.bancomatPay.headLine"|trans|striptags }}:*</label>
<label for="mollieBancomatPayPhone">{{ "molliePayments.components.bancomatPay.headLine"|trans|striptags }}:</label>
<input id="mollieBancomatPayPhone"
placeholder="+49123456789"
name="mollieBancomatPayPhone" form="confirmOrderForm" type="text" pattern="\+[1-9]\d{1,14}"
class="form-control"
value="{{ context.customer.activeBillingAddress.phoneNumber }}"
required="required" />
/>
<small class="form-text js-validation-message invalid-feedback d-none"
data-form-validation-invalid-phone="true" invalid="true">
{{ "molliePayments.components.bancomatPay.phoneErrorMessage"|trans|striptags }}
Expand Down
5 changes: 0 additions & 5 deletions src/Service/Payment/Remover/RegularPaymentRemover.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ public function removePaymentMethods(PaymentMethodRouteResponse $originalData, S
if ($attributes->getMollieIdentifier() === PaymentMethod::INGHOMEPAY) {
$originalData->getPaymentMethods()->remove($key);
}

# currently for bancomat, you cannot update the phone number, so customer might stuck in order edit. we remove the payment method for now and will enable it when the mollie api allows to change that
if ($this->isOrderRoute() && $attributes->getMollieIdentifier() === PaymentMethod::BANCOMATPAY) {
$originalData->getPaymentMethods()->remove($key);
}
}

return $originalData;
Expand Down

0 comments on commit b637b0a

Please sign in to comment.