Skip to content

Commit e8a844e

Browse files
authored
[Payments] Change constraint name for blik (#315)
2 parents 75998ca + 938df73 commit e8a844e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/_matrix.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"php": "8.4",
1414
"sylius": "~2.1.0",
15-
"symfony": "~7.2.0",
15+
"symfony": "~7.3.0",
1616
"mysql": "8.0",
1717
"state_machine": "symfony_workflow"
1818
}
@@ -23,7 +23,7 @@
2323
"ci": {
2424
"php": ["8.2", "8.4"],
2525
"sylius": ["~2.0.0", "~2.1.0"],
26-
"symfony": ["~6.4.0", "~7.2.0"],
26+
"symfony": ["~6.4.0", "~7.3.0"],
2727
"mysql": ["8.0"],
2828
"state_machine": ["winzou_state_machine", "symfony_workflow"]
2929
}

config/validation/Pay.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
</property>
3535
<property name="blikToken">
3636
<constraint name="Length">
37-
<option name="value">6</option>
37+
<option name="min">6</option>
38+
<option name="max">6</option>
3839
<option name="exactMessage">commerce_weavers_sylius_tpay.shop.pay.blik_token.length</option>
3940
<option name="groups">
4041
<value>commerce_weavers_sylius_tpay:shop:order:pay</value>

tests/Unit/Api/Command/PayHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function test_it_executes_pay_by_blik_command_if_a_blik_token_is_passed()
8383
$this->messageBus
8484
->dispatch(Argument::that(function (PayByBlik $pay): bool {
8585
return $pay->blikToken === '777123' && $pay->paymentId === 1;
86-
}))
86+
}), Argument::cetera())
8787
->shouldBeCalled()
8888
->willReturn($payResultEnvelope)
8989
;

translations/validators.en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ commerce_weavers_sylius_tpay:
66
blik:
77
required_fields: 'You must provide a BLIK token or use an alias to pay with BLIK.'
88
blik_token:
9-
length: 'The BLIK token must have exactly {{ limit }} characters.'
9+
length: 'The BLIK token must have exactly 6 characters.'
1010
required: 'The BLIK token is required.'
1111
required_with_alias_register: 'The BLIK token is required with an alias register action.'
1212
field:

0 commit comments

Comments
 (0)