Skip to content

Commit c2ed830

Browse files
authored
Merge pull request #57 from paynl/feature/PLUG-5385
PLUG-5385 - Update setReference check
2 parents 81b6e10 + caac301 commit c2ed830

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Model/Request/OrderCreateRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function setDescription(string $description): self
201201
*/
202202
public function setReference(string $reference): self
203203
{
204-
if (!ctype_alnum($reference)) {
204+
if (!preg_match('/^([A-Za-z0-9-]+)$/', $reference)) {
205205
throw new \Exception('Reference should consist of all letters or digits');
206206
}
207207
$this->reference = $reference;

src/Util/Exchange.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ public function setExchangeResponse(ExchangeResponse $e, bool $returnOutput = fa
144144
/**
145145
* Retrieve payload with exception handling.
146146
*
147-
* @return Payload
147+
* @return PayLoad
148148
* @throws PayException
149149
*/
150-
private function getSafePayload(): Payload
150+
private function getSafePayload(): PayLoad
151151
{
152152
try {
153153
return $this->getPayload();

0 commit comments

Comments
 (0)