Skip to content

Commit

Permalink
fix: reference size in CancelRequest
Browse files Browse the repository at this point in the history
closes: #38
  • Loading branch information
rtouze committed Apr 3, 2024
1 parent cad7ab8 commit 74faf94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Requests/CancelRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function validate(): bool
throw Exception::invalidOrderDate();
}

if (strlen($this->reference) > 12) {
if (strlen($this->reference) > 50) {
throw Exception::invalidReference($this->reference);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/CancelRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testRecoveryConstructExceptionInvalidReference()
new CancelRequest([
'dateTime' => Carbon::create(2019, 2, 1),
'orderDate' => Carbon::create(2019, 1, 1),
'reference' => 'thisisatoolongreference',
'reference' => 'thisisatoolongreferencethisisatoolongreference11111',
'language' => 'FR',
'currency' => 'EUR',
'amount' => 100,
Expand Down

0 comments on commit 74faf94

Please sign in to comment.