Skip to content
Closed
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
12 changes: 5 additions & 7 deletions app/config/eccube/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,11 @@ services:
arguments:
$accessTokenHandler: '@?Symfony\Component\Security\Http\AccessToken\AccessTokenHandlerInterface'

# Agent Commerce 決済ハンドラ (#6574 UCP / #6776 ACP)
# 具象ハンドラは決済プラグインが agent_commerce.payment_handler タグで寄与する。
_instanceof:
Eccube\Service\AgentCommerce\Payment\AgentCheckoutPaymentHandlerInterface:
tags: ['agent_commerce.payment_handler']

# 決済ハンドラレジストリ。具象ハンドラ (決済プラグイン) は agent_commerce.payment_handler タグで寄与する。
# Agent Commerce 決済ハンドラレジストリ (#6574 UCP / #6776 ACP)
# 具象ハンドラ (決済プラグイン) は agent_commerce.payment_handler タグで寄与する。
# タグ付けは Kernel::build() の registerForAutoconfiguration で行う (PaymentMethodInterface と同様)。
# services.yaml の _instanceof はファイルスコープのため、Plugin\ glob (services.php・#6915) で
# 登録される決済プラグインの具象ハンドラには届かない。
Eccube\Service\AgentCommerce\Payment\AgentCheckoutPaymentHandlerRegistry:
arguments:
$handlers: !tagged_iterator agent_commerce.payment_handler
Expand Down
8 changes: 8 additions & 0 deletions src/Eccube/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Eccube\Doctrine\ORM\Mapping\Driver\TraitProxyAttributeDriver;
use Eccube\Doctrine\Query\QueryCustomizer;
use Eccube\Log\Logger;
use Eccube\Service\AgentCommerce\Payment\AgentCheckoutPaymentHandlerInterface;
use Eccube\Service\Payment\PaymentMethodInterface;
use Eccube\Service\PurchaseFlow\DiscountProcessor;
use Eccube\Service\PurchaseFlow\ItemHolderPostValidator;
Expand Down Expand Up @@ -268,6 +269,13 @@ protected function build(ContainerBuilder $container): void
->addTag(PaymentMethodPass::PAYMENT_METHOD_TAG);
$container->addCompilerPass(new PaymentMethodPass());

// Agent Commerce 決済ハンドラ (#6574 UCP / #6776 ACP) の拡張。
// 決済プラグインの具象ハンドラは Plugin\ glob (services.php・#6915) で登録されるため、
// services.yaml のファイルスコープな _instanceof ではタグが付かない。
// PaymentMethodInterface と同様にコンテナ全体へ効く registerForAutoconfiguration でタグ付けする。
$container->registerForAutoconfiguration(AgentCheckoutPaymentHandlerInterface::class)
->addTag('agent_commerce.payment_handler');

// PurchaseFlow の拡張
$container->registerForAutoconfiguration(ItemPreprocessor::class)
->addTag(PurchaseFlowPass::ITEM_PREPROCESSOR_TAG);
Expand Down
Loading