mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[PaymentRequest] Move offline command and command handlers to PaymentBundle
This commit is contained in:
parent
55f01c4ccd
commit
49a22c7826
6 changed files with 16 additions and 19 deletions
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sylius\Bundle\CoreBundle\PaymentRequest\Command\Offline;
|
||||
namespace Sylius\Bundle\PaymentBundle\Command\Offline;
|
||||
|
||||
use Sylius\Bundle\PaymentBundle\Command\PaymentRequestHashAwareInterface;
|
||||
use Sylius\Bundle\PaymentBundle\Command\PaymentRequestHashAwareTrait;
|
||||
|
|
@ -20,8 +20,7 @@ class CapturePaymentRequest implements PaymentRequestHashAwareInterface
|
|||
{
|
||||
use PaymentRequestHashAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected ?string $hash,
|
||||
) {
|
||||
public function __construct(protected ?string $hash)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Sylius\Bundle\CoreBundle\PaymentRequest\CommandHandler\Offline;
|
||||
namespace Sylius\Bundle\PaymentBundle\CommandHandler\Offline;
|
||||
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInterface;
|
||||
use Sylius\Bundle\PaymentBundle\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Component\Payment\Model\PaymentRequestInterface;
|
||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\PaymentBundle\CommandProvider\Offline;
|
||||
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Bundle\PaymentBundle\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Bundle\PaymentBundle\CommandProvider\PaymentRequestCommandProviderInterface;
|
||||
use Sylius\Component\Payment\Model\PaymentRequestInterface;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,14 +11,15 @@
|
|||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
<service id="sylius.payment_request.offline.capture" class="Sylius\Bundle\CoreBundle\PaymentRequest\CommandHandler\Offline\CapturePaymentRequestHandler">
|
||||
<service id="sylius.payment_request.offline.capture" class="Sylius\Bundle\PaymentBundle\CommandHandler\Offline\CapturePaymentRequestHandler">
|
||||
<argument type="service" id="Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInterface" />
|
||||
<tag name="messenger.message_handler" bus="sylius.payment_request.command_bus" />
|
||||
</service>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<tag name="sylius.payment_request.command_provider" gateway-factory="offline" />
|
||||
</service>
|
||||
|
||||
<service id="sylius.payment_request.command_provider.offline.capture" class="Sylius\Bundle\CoreBundle\PaymentRequest\CommandProvider\Offline\CapturePaymentRequestCommandProvider">
|
||||
<service id="sylius.payment_request.command_provider.offline.capture" class="Sylius\Bundle\PaymentBundle\CommandProvider\Offline\CapturePaymentRequestCommandProvider">
|
||||
<tag name="sylius.payment_request.command_provider.offline" action="capture" />
|
||||
</service>
|
||||
</services>
|
||||
|
|
|
|||
|
|
@ -11,20 +11,17 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace spec\Sylius\Bundle\CoreBundle\PaymentRequest\CommandHandler\Offline;
|
||||
namespace spec\Sylius\Bundle\PaymentBundle\CommandHandler\Offline;
|
||||
|
||||
use PhpSpec\ObjectBehavior;
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Processor\Offline\CaptureProcessorInterface;
|
||||
use Sylius\Bundle\CoreBundle\PaymentRequest\Provider\PaymentRequestProviderInterface;
|
||||
use Sylius\Component\Payment\Model\PaymentRequest;
|
||||
use Sylius\Bundle\PaymentBundle\Command\Offline\CapturePaymentRequest;
|
||||
use Sylius\Component\Payment\Model\PaymentRequestInterface;
|
||||
|
||||
final class CapturePaymentRequestHandlerSpec extends ObjectBehavior
|
||||
{
|
||||
function let(
|
||||
PaymentRequestProviderInterface $paymentRequestProvider
|
||||
): void {
|
||||
function let(PaymentRequestProviderInterface $paymentRequestProvider): void
|
||||
{
|
||||
$this->beConstructedWith($paymentRequestProvider);
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue