Skip to content

Commit

Permalink
league container fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GytisZum committed May 27, 2024
1 parent e3bc59a commit 8f851e4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 2 additions & 0 deletions src/DTO/OrderData.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ public function jsonSerialize()
'familyName' => $this->cleanUpInput($this->getBillingAddress()->lastname),
'email' => $this->cleanUpInput($this->getEmail()),
'title' => $this->cleanUpInput($this->getTitle()),
'phone' =>$this->cleanUpInput($this->getBillingPhoneNumber()),
],
'shippingAddress' => [
'organizationName' => $this->cleanUpInput($this->getShippingAddress()->company),
Expand All @@ -445,6 +446,7 @@ public function jsonSerialize()
'familyName' => $this->cleanUpInput($this->getShippingAddress()->lastname),
'email' => $this->cleanUpInput($this->getEmail()),
'title' => $this->cleanUpInput($this->getTitle()),
'phone' => $this->cleanUpInput($this->getDeliveryPhoneNumber()),
],
'redirectUrl' => $this->getRedirectUrl(),
'webhookUrl' => $this->getWebhookUrl(),
Expand Down
48 changes: 23 additions & 25 deletions src/ServiceProvider/BaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,12 @@
use Mollie\Repository\CartRuleRepositoryInterface;
use Mollie\Repository\CountryRepository;
use Mollie\Repository\CountryRepositoryInterface;
use Mollie\Repository\CurrencyRepository;
use Mollie\Repository\CurrencyRepositoryInterface;
use Mollie\Repository\CustomerRepository;
use Mollie\Repository\CustomerRepositoryInterface;
use Mollie\Repository\GenderRepository;
use Mollie\Repository\GenderRepositoryInterface;
use Mollie\Repository\MolCustomerRepository;
use Mollie\Repository\MolCustomerRepositoryInterface;
use Mollie\Repository\MolOrderPaymentFeeRepository;
use Mollie\Repository\MolOrderPaymentFeeRepositoryInterface;
use Mollie\Repository\OrderRepository;
Expand Down Expand Up @@ -105,11 +104,13 @@
use Mollie\Service\Shipment\ShipmentInformationSenderInterface;
use Mollie\Service\ShipmentService;
use Mollie\Service\ShipmentServiceInterface;
use Mollie\Shared\Core\Shared\Repository\CurrencyRepository;
use Mollie\Shared\Core\Shared\Repository\CurrencyRepositoryInterface;
use Mollie\Subscription\Grid\Accessibility\SubscriptionCancelAccessibility;
use Mollie\Subscription\Install\Installer;
use Mollie\Subscription\Install\InstallerInterface;
use Mollie\Subscription\Logger\Logger;
use Mollie\Subscription\Logger\LoggerInterface;
use Mollie\Subscription\Repository\CombinationRepository;
use Mollie\Subscription\Repository\CombinationRepositoryInterface;
use Mollie\Subscription\Repository\OrderDetailRepository;
use Mollie\Subscription\Repository\OrderDetailRepositoryInterface;
use Mollie\Subscription\Repository\RecurringOrderRepository;
Expand Down Expand Up @@ -147,7 +148,6 @@ public function __construct($extendedServices)
public function register(Container $container)
{
/* Logger */
$this->addService($container, LoggerInterface::class, $container->get(Logger::class));
$this->addService($container, PrestaLoggerInterface::class, $container->get(PrestaLogger::class));

/* Utility */
Expand All @@ -161,18 +161,18 @@ public function register(Container $container)
$this->addService($container, CountryRepositoryInterface::class, $container->get(CountryRepository::class));
$this->addService($container, PaymentMethodRepositoryInterface::class, $container->get(PaymentMethodRepository::class));
$this->addService($container, GenderRepositoryInterface::class, $container->get(GenderRepository::class));
$this->addService($container, CombinationRepositoryInterface::class, $container->get(CombinationRepository::class));
$this->addService($container, MolCustomerRepositoryInterface::class, $container->get(MolCustomerRepository::class));

$service = $this->addService($container, MolCustomerRepository::class, MolCustomerRepository::class);
$this->addServiceArgument($service, 'MolCustomer');

$this->addService($container, UninstallerInterface::class, $container->get(Mollie\Install\DatabaseTableUninstaller::class));

$service = $this->addService($container, InstallerInterface::class, Installer::class);
$this->addServiceArgument($service, [
$container->get(Mollie\Subscription\Install\DatabaseTableInstaller::class),
$container->get(Mollie\Subscription\Install\AttributeInstaller::class),
$container->get(Mollie\Subscription\Install\HookInstaller::class),
]);
$this->addServiceArgument($service, $container->get(Mollie\Subscription\Install\DatabaseTableInstaller::class));
$this->addServiceArgument($service, $container->get(Mollie\Subscription\Install\AttributeInstaller::class));
$this->addServiceArgument($service, $container->get(Mollie\Subscription\Install\HookInstaller::class));

$this->addService($container, DecoderInterface::class, JsonDecoder::class);

Expand All @@ -186,12 +186,8 @@ public function register(Container $container)
$this->addService($container, ShipmentInformationSenderInterface::class, $container->get(ShipmentInformationSender::class));

$service = $this->addService($container, ShipmentSenderHandlerInterface::class, ShipmentSenderHandler::class);
$this->addServiceArgument($service,
[
$container->get(ShipmentVerificationInterface::class),
$container->get(ShipmentInformationSenderInterface::class),
]
);
$this->addServiceArgument($service, $container->get(ShipmentVerificationInterface::class));
$this->addServiceArgument($service, $container->get(ShipmentInformationSenderInterface::class));

$this->addService($container, AddressRepositoryInterface::class, $container->get(AddressRepository::class));
$this->addService($container, AddressFormatRepositoryInterface::class, $container->get(AddressFormatRepository::class));
Expand Down Expand Up @@ -228,15 +224,17 @@ public function register(Container $container)

$this->addService($container, PaymentMethodSortProviderInterface::class, PaymentMethodSortProvider::class);
$this->addService($container, PhoneNumberProviderInterface::class, PhoneNumberProvider::class);
$service = $this->addService($container, PaymentMethodRestrictionValidationInterface::class, PaymentMethodRestrictionValidation::class);
$this->addServiceArgument($service, [
$container->get(BasePaymentMethodRestrictionValidator::class),
$container->get(VoucherPaymentMethodRestrictionValidator::class),
$container->get(EnvironmentVersionSpecificPaymentMethodRestrictionValidator::class),
$container->get(ApplePayPaymentMethodRestrictionValidator::class),
$container->get(AmountPaymentMethodRestrictionValidator::class),
$container->get(B2bPaymentMethodRestrictionValidator::class),
]);

$this->addService($container, PaymentMethodRestrictionValidationInterface::class, function() use ($container) {
return new PaymentMethodRestrictionValidation([
$container->get(BasePaymentMethodRestrictionValidator::class),
$container->get(VoucherPaymentMethodRestrictionValidator::class),
$container->get(EnvironmentVersionSpecificPaymentMethodRestrictionValidator::class),
$container->get(ApplePayPaymentMethodRestrictionValidator::class),
$container->get(AmountPaymentMethodRestrictionValidator::class),
$container->get(B2bPaymentMethodRestrictionValidator::class),
]);
});

$this->addService($container, CustomLogoProviderInterface::class, $container->get(CreditCardLogoProvider::class));

Expand Down

0 comments on commit 8f851e4

Please sign in to comment.