Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/payone 159 #260

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9f01375
[PAYONE-184] Add compatibility for shopware 6.5
Mar 28, 2023
33bfd11
[PAYONE-184] Add manual improvements and compatibility changes (befor…
Apr 27, 2023
f7aa266
[PAYONE-184] Add changes made by rector (up to PHP 8.1)
Apr 27, 2023
c6e74bb
[PAYONE-184] Add refactoring of payment handler and more improvements
May 8, 2023
20138d2
[PAYONE-184] changes payone settings support template and styling
clarissa-minkwitz May 11, 2023
4a63004
[PAYONE-184] changes payone credit card template and styling
clarissa-minkwitz May 12, 2023
6b50a80
[PAYONE-184] changes payone ratepay installment template and styling
clarissa-minkwitz May 12, 2023
8fae30d
[PAYONE-184] changes payone ratepay debit template
clarissa-minkwitz May 12, 2023
625e477
[PAYONE-184] changes payone ratepay open invoice template
clarissa-minkwitz May 12, 2023
b23df09
[PAYONE-184] adds class changes for bootstrap v5
clarissa-minkwitz May 12, 2023
6a46e74
[PAYONE-184] Adjust test workflow for Shopware 6.5 and fix migrations…
May 15, 2023
aa788db
[PAYONE-184] Remove src/Resources/public/static directory from gitign…
May 15, 2023
6d7496f
[PAYONE-184] adds padding to modal body
clarissa-minkwitz May 22, 2023
3be37de
[PAYONE-184] Fix capture for Przelewy24
May 24, 2023
c2e8f57
[PAYONE-184] Add changelogs and version 6.5.1.0 to test matrix
Jun 1, 2023
4f09306
[PAYONE-184] Fix unit test for different hosts
Jun 2, 2023
d873d42
[PAYONE-184] add 6.5.2.0 to github pipeline
rommelfreddy Jun 21, 2023
890e8e1
[PAYONE-184] remove composer dependecies & add execute-composer-comma…
rommelfreddy Jun 22, 2023
21a13a4
resolve phpstan issues
rommelfreddy Jun 22, 2023
d6bb0c4
add missing class import (after rebase)
rommelfreddy Jun 22, 2023
ba70ea3
fix rector issues
rommelfreddy Jun 22, 2023
fb758b6
add symfony/runtime to allowed packages for github pipeline
rommelfreddy Jun 22, 2023
d8989c3
update rector/ecs & fix ecs/rector issues
rommelfreddy Jun 22, 2023
f8dd706
update github-actions &. removed phpstan bleeding-edge
rommelfreddy Jun 22, 2023
b3d5b0d
fix phpstan issues
rommelfreddy Jun 22, 2023
2a9de10
[PAYONE-159] if there is no company name in config, paymentmethod sho…
amirinterlutions Jun 22, 2023
1805f13
[PAYONE-159] if there is no company name in config, paymentmethod sho…
amirinterlutions Jun 23, 2023
018e487
[PAYONE-159] fix code style
amirinterlutions Jun 23, 2023
f7d42d6
[PAYONE-159] merge with master: if there is no company name in config…
amirinterlutions Nov 9, 2023
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
58 changes: 34 additions & 24 deletions src/EventListener/CheckoutConfirmPayolutionEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
namespace PayonePayment\EventListener;

use PayonePayment\Components\ConfigReader\ConfigReaderInterface;
use PayonePayment\Configuration\ConfigurationPrefixes;
use PayonePayment\PaymentHandler\PayonePayolutionDebitPaymentHandler;
use PayonePayment\PaymentHandler\PayonePayolutionInstallmentPaymentHandler;
use PayonePayment\PaymentHandler\PayonePayolutionInvoicingPaymentHandler;
use PayonePayment\PaymentMethod\PayonePayolutionDebit;
use PayonePayment\PaymentMethod\PayonePayolutionInstallment;
use PayonePayment\PaymentMethod\PayonePayolutionInvoicing;
use Shopware\Core\Checkout\Payment\PaymentMethodCollection;
Expand All @@ -24,30 +29,31 @@
public static function getSubscribedEvents(): array
{
return [
CheckoutConfirmPageLoadedEvent::class => 'hidePaymentMethodsForCompanies',
AccountPaymentMethodPageLoadedEvent::class => 'hidePaymentMethodsForCompanies',
AccountEditOrderPageLoadedEvent::class => 'hidePaymentMethodsForCompanies',
CheckoutConfirmPageLoadedEvent::class => 'hidePaymentMethods',
AccountPaymentMethodPageLoadedEvent::class => 'hidePaymentMethods',
AccountEditOrderPageLoadedEvent::class => 'hidePaymentMethods',
];
}

public function hidePaymentMethodsForCompanies(
public function hidePaymentMethods(
CheckoutConfirmPageLoadedEvent|AccountPaymentMethodPageLoadedEvent|AccountEditOrderPageLoadedEvent $event
): void {
$page = $event->getPage();

if (!$this->customerHasCompanyAddress($event->getSalesChannelContext())) {
return;
}

$paymentMethods = $page->getPaymentMethods();

$paymentMethods = $this->removePaymentMethod($paymentMethods, PayonePayolutionInstallment::UUID);

/* Remove Payolution payment methods if company name is missing */
$paymentMethods = $this->removePaymentMethodIfMissing($paymentMethods, $event->getSalesChannelContext(), PayonePayolutionInvoicingPaymentHandler::class, PayonePayolutionInvoicing::UUID);
$paymentMethods = $this->removePaymentMethodIfMissing($paymentMethods, $event->getSalesChannelContext(), PayonePayolutionDebitPaymentHandler::class, PayonePayolutionDebit::UUID);

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 48 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.
$paymentMethods = $this->removePaymentMethodIfMissing($paymentMethods, $event->getSalesChannelContext(), PayonePayolutionInstallmentPaymentHandler::class, PayonePayolutionInstallment::UUID);

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 49 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

if ($this->companyDataHandlingIsDisabled($event->getSalesChannelContext())) {
$paymentMethods = $this->removePaymentMethod($paymentMethods, PayonePayolutionInvoicing::UUID);

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 52 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethod() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.
}


$page->setPaymentMethods($paymentMethods);

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.

Check failure on line 56 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Parameter #1 $paymentMethods of method Shopware\Storefront\Page\Account\Order\AccountEditOrderPage::setPaymentMethods() expects Shopware\Core\Checkout\Payment\PaymentMethodCollection, array|Shopware\Core\Checkout\Payment\PaymentMethodCollection given.
}

private function removePaymentMethod(PaymentMethodCollection $paymentMethods, string $paymentMethodId): PaymentMethodCollection
Expand All @@ -57,27 +63,31 @@
);
}

private function customerHasCompanyAddress(SalesChannelContext $context): bool
{
$customer = $context->getCustomer();

if ($customer === null) {
return false;
private function removePaymentMethodIfMissing(

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.

Check failure on line 66 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::removePaymentMethodIfMissing() never returns array so it can be removed from the return type.
PaymentMethodCollection $paymentMethods,
SalesChannelContext $context,
string $paymentHandlerClass,
string $paymentMethodUUID
): PaymentMethodCollection|array {
if ($this->companyNameMissing($context, $paymentHandlerClass)) {
return $this->removePaymentMethod($paymentMethods, $paymentMethodUUID);
}

$billingAddress = $customer->getActiveBillingAddress();

if ($billingAddress === null) {
return false;
}

return !empty($billingAddress->getCompany());
return $paymentMethods;
}

private function companyDataHandlingIsDisabled(SalesChannelContext $context): bool
{
$configuration = $this->configReader->read($context->getSalesChannel()->getId());
return !($this->getConfiguration($context, 'payolutionInvoicingTransferCompanyData'));
}

return !($configuration->get('payolutionInvoicingTransferCompanyData'));
private function companyNameMissing(SalesChannelContext $context, string $paymentHandler): bool
{
return empty($this->getConfiguration($context, ConfigurationPrefixes::CONFIGURATION_PREFIXES[$paymentHandler] . 'CompanyName'));
}

private function getConfiguration(SalesChannelContext $context, $configName): array|bool|int|string

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.

Check failure on line 89 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() has parameter $configName with no type specified.
{
return $this->configReader->read($context->getSalesChannel()->getId())->get($configName);

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.1.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.2.0, PHP 8.2, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 8.0

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.

Check failure on line 91 in src/EventListener/CheckoutConfirmPayolutionEventListener.php

View workflow job for this annotation

GitHub Actions / SW v6.5.0.0, PHP 8.1, MySQL 5.7

Method PayonePayment\EventListener\CheckoutConfirmPayolutionEventListener::getConfiguration() should return array|bool|int|string but returns array|bool|int|string|null.
}
}
4 changes: 2 additions & 2 deletions src/Resources/snippet/en_GB/messages.en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
},
"consentCheckbox": {
"introduction": "With the transmission of the data necessary for the completion of the invoice purchase, an identity check and credit check to payolution GmbH, Am Euro Platz 2, 1120 Wien I agree.",
"textWithLink": "I can revoke my <a href=\"%link%\" data-url=\"%link%\" data-modal-class=\"payolution\" data-toggle=\"modal\" title=\"Einwilligung\">consent</a> at any time with effect for the future."
"textWithLink": "I can revoke my <a data-toggle=\"modal\" data-bs-toggle=\"modal\" data-url=\"%link%\" href=\"%link%\" title=\"Einwilligung\">consent</a> at any time with effect for the future."
},
"mandateCheckbox": {
"textWithLink": "I hereby issue the <a href=\"%link%\" target=\"_blank\" title=\"Paysafe Pay Later SEPA mandate\">SEPA direct debit mandate</a>."
Expand Down Expand Up @@ -290,4 +290,4 @@
"VIOLATION::PAYONE_INVALID_FORMAT_ERROR": "Please provide a valid IBAN.",
"VIOLATION::PAYONE_NOT_SUPPORTED_COUNTRY_CODE_ERROR": "The country of the IBAN is not valid."
}
}
}
Loading