diff --git a/src/Sylius/Bundle/ApiBundle/Command/Payment/AddPaymentRequest.php b/src/Sylius/Bundle/ApiBundle/Command/Payment/AddPaymentRequest.php index dd9761734e..78315e733a 100644 --- a/src/Sylius/Bundle/ApiBundle/Command/Payment/AddPaymentRequest.php +++ b/src/Sylius/Bundle/ApiBundle/Command/Payment/AddPaymentRequest.php @@ -16,10 +16,12 @@ namespace Sylius\Bundle\ApiBundle\Command\Payment; use Sylius\Bundle\ApiBundle\Attribute\OrderTokenValueAware; use Sylius\Bundle\ApiBundle\Attribute\PaymentRequestActionAware; use Sylius\Bundle\ApiBundle\Command\IriToIdentifierConversionAwareInterface; +use Sylius\Bundle\ApiBundle\Validator\Constraints\OrderPaymentRequestEligibility; /** @experimental */ #[OrderTokenValueAware] #[PaymentRequestActionAware] +#[OrderPaymentRequestEligibility] class AddPaymentRequest implements IriToIdentifierConversionAwareInterface { public function __construct( diff --git a/src/Sylius/Bundle/ApiBundle/Command/Payment/UpdatePaymentRequest.php b/src/Sylius/Bundle/ApiBundle/Command/Payment/UpdatePaymentRequest.php index ffb8b58843..772f4c5e73 100644 --- a/src/Sylius/Bundle/ApiBundle/Command/Payment/UpdatePaymentRequest.php +++ b/src/Sylius/Bundle/ApiBundle/Command/Payment/UpdatePaymentRequest.php @@ -15,9 +15,11 @@ namespace Sylius\Bundle\ApiBundle\Command\Payment; use Sylius\Bundle\ApiBundle\Attribute\PaymentRequestHashAware; use Sylius\Bundle\ApiBundle\Command\IriToIdentifierConversionAwareInterface; +use Sylius\Bundle\ApiBundle\Validator\Constraints\OrderPaymentRequestEligibility; /** @experimental */ #[PaymentRequestHashAware] +#[OrderPaymentRequestEligibility] class UpdatePaymentRequest implements IriToIdentifierConversionAwareInterface { public function __construct( diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/services/validator.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/services/validator.xml index 5c18c7ff23..68daf7231d 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/services/validator.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/services/validator.xml @@ -201,6 +201,12 @@ + + + + + + diff --git a/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddPaymentRequest.xml b/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddPaymentRequest.xml index 9486f588a3..2b0b65e36c 100644 --- a/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddPaymentRequest.xml +++ b/src/Sylius/Bundle/ApiBundle/Resources/config/validation/AddPaymentRequest.xml @@ -13,6 +13,11 @@ + + +