Skip to content

Commit

Permalink
[Apple][Google] Add requirement to define apple and google identifiers (
Browse files Browse the repository at this point in the history
  • Loading branch information
lchrusciel authored Nov 28, 2024
2 parents 79c4fd4 + df94ef7 commit b79c972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ApplePayPayment/Form/Type/GatewayConfigurationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use CommerceWeavers\SyliusTpayPlugin\Form\Type\AbstractTpayGatewayConfigurationType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\NotBlank;

final class GatewayConfigurationType extends AbstractTpayGatewayConfigurationType
{
Expand All @@ -23,6 +24,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.apple_pay_merchant_id',
'required' => true,
'priority' => -250,
'constraints' => [
new NotBlank(allowNull: false, groups: ['sylius']),
],
'validation_groups' => ['sylius'],
],
)
;
Expand Down
5 changes: 5 additions & 0 deletions src/GooglePayPayment/Form/Type/GatewayConfigurationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use CommerceWeavers\SyliusTpayPlugin\Form\Type\AbstractTpayGatewayConfigurationType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints\NotBlank;

final class GatewayConfigurationType extends AbstractTpayGatewayConfigurationType
{
Expand All @@ -23,6 +24,10 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.google_merchant_id',
'required' => true,
'priority' => -250,
'constraints' => [
new NotBlank(allowNull: false, groups: ['sylius']),
],
'validation_groups' => ['sylius'],
],
)
;
Expand Down

0 comments on commit b79c972

Please sign in to comment.