From 74faf942dc5484557a8159aa4b38797dd2717aee Mon Sep 17 00:00:00 2001 From: Romain TOUZE Date: Wed, 3 Apr 2024 23:40:07 +0200 Subject: [PATCH] fix: reference size in CancelRequest closes: #38 --- src/Requests/CancelRequest.php | 2 +- tests/CancelRequestTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Requests/CancelRequest.php b/src/Requests/CancelRequest.php index 7b65fea..0fe0b5b 100644 --- a/src/Requests/CancelRequest.php +++ b/src/Requests/CancelRequest.php @@ -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); } diff --git a/tests/CancelRequestTest.php b/tests/CancelRequestTest.php index 4160f5c..4a6fc9e 100644 --- a/tests/CancelRequestTest.php +++ b/tests/CancelRequestTest.php @@ -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,